Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/lib/langs/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,5 +711,11 @@
"Move earlier": "Move earlier",
"Move later": "Move later",
"Remove agent from the chain": "Remove agent from the chain",
"No tools found for the agents on this case. Add the agent under Involved agents, or type the name.": "No tools found for the agents on this case. Add the agent under Involved agents, or type the name."
"No tools found for the agents on this case. Add the agent under Involved agents, or type the name.": "No tools found for the agents on this case. Add the agent under Involved agents, or type the name.",
"Filler": "Filler",
"Idle prompt": "Idle prompt",
"Idle goodbye": "Idle goodbye",
"Apology": "Apology",
"Said again": "Said again",
"Said by the phone relay on its own, kept as a record of what the caller heard": "Said by the phone relay on its own, kept as a record of what the caller heard"
}
8 changes: 7 additions & 1 deletion src/lib/langs/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,5 +905,11 @@
"Move earlier": "前移",
"Move later": "后移",
"Remove agent from the chain": "从调用链里移除",
"No tools found for the agents on this case. Add the agent under Involved agents, or type the name.": "这条用例涉及的 Agent 没有查到可用工具。可以在\"涉及的 Agent\"里补上对应 Agent,或者手动输入工具名。"
"No tools found for the agents on this case. Add the agent under Involved agents, or type the name.": "这条用例涉及的 Agent 没有查到可用工具。可以在\"涉及的 Agent\"里补上对应 Agent,或者手动输入工具名。",
"Filler": "等待语",
"Idle prompt": "空闲提示",
"Idle goodbye": "挂断告别",
"Apology": "道歉",
"Said again": "重说",
"Said by the phone relay on its own, kept as a record of what the caller heard": "电话中继自己说的话,仅记录来电者听到了什么"
}
19 changes: 19 additions & 0 deletions src/routes/page/conversation/[conversationId]/conv-dialogs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
const maxTextLength = 4096;
const duration = 1500;

// Lines a phone relay said on its own, kept only as a record of what the caller heard (the Twilio plugin's
// ConversationRelayLabels). They show under the agent's name, so each is tagged with what it was.
/** @type {Record<string, string>} */
const relayLineTags = {
twilio_relay_filler: 'Filler',
twilio_relay_idle_prompt: 'Idle prompt',
twilio_relay_idle_goodbye: 'Idle goodbye',
twilio_relay_apology: 'Apology',
twilio_relay_said_again: 'Said again'
};

/**
* @type {{
* conversation: import('$conversationTypes').ConversationModel,
Expand Down Expand Up @@ -151,6 +162,14 @@
<div class="flex flex-wrap items-baseline gap-2">
<span class="text-sm font-semibold text-dark dark:text-gray-100">{dialog.sender?.full_name || dialog.sender?.user_name || 'Unknown'}</span>
<span class="text-[0.7rem] text-muted">{utcToLocal(dialog.created_at)}</span>
{#if dialog.message_label && relayLineTags[dialog.message_label]}
<span
class="inline-flex items-center rounded-full bg-info/10 px-2 py-0.5 text-xs font-medium text-info"
title={$_('Said by the phone relay on its own, kept as a record of what the caller heard')}
>
{$_(relayLineTags[dialog.message_label])}
</span>
{/if}
</div>
<div class="mt-1.5">
<ConvDialogElement dialog={dialog} />
Expand Down