diff --git a/src/lib/langs/en.json b/src/lib/langs/en.json index 084812fa..75430d0d 100644 --- a/src/lib/langs/en.json +++ b/src/lib/langs/en.json @@ -665,5 +665,16 @@ "Worth checking:": "Worth checking:", "changed by chat": "changed by chat", "New Case by Chat": "New Case by Chat", - "This suite has no judge model configured, so chat authoring has no default to fall back on -- pick one above.": "This suite has no judge model configured, so chat authoring has no default to fall back on -- pick one above." + "This suite has no judge model configured, so chat authoring has no default to fall back on -- pick one above.": "This suite has no judge model configured, so chat authoring has no default to fall back on -- pick one above.", + "Search tools": "Search tools", + "Pick a tool": "Pick a tool", + "Pick an agent": "Pick an agent", + "Type a name instead": "Type a name instead", + "Pick from the list": "Pick from the list", + "agent name or id": "agent name or id", + "Add an agent to the chain": "Add an agent to the chain", + "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." } diff --git a/src/lib/langs/zh.json b/src/lib/langs/zh.json index ab7f6f34..574713a3 100644 --- a/src/lib/langs/zh.json +++ b/src/lib/langs/zh.json @@ -859,5 +859,16 @@ "Worth checking:": "建议确认一下:", "changed by chat": "对话改动过", "New Case by Chat": "用对话新建", - "This suite has no judge model configured, so chat authoring has no default to fall back on -- pick one above.": "这个套件没有配置判官模型,对话出题也就没有默认可用的模型——请在上面选一个。" + "This suite has no judge model configured, so chat authoring has no default to fall back on -- pick one above.": "这个套件没有配置判官模型,对话出题也就没有默认可用的模型——请在上面选一个。", + "Search tools": "搜索工具", + "Pick a tool": "选择工具", + "Pick an agent": "选择 Agent", + "Type a name instead": "改为手动输入", + "Pick from the list": "改为从列表选择", + "agent name or id": "Agent 名称或 id", + "Add an agent to the chain": "往调用链里加一个 Agent", + "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,或者手动输入工具名。" } diff --git a/src/lib/styles/pages/_agent-test.scss b/src/lib/styles/pages/_agent-test.scss index 1f098c9d..0ecfc726 100644 --- a/src/lib/styles/pages/_agent-test.scss +++ b/src/lib/styles/pages/_agent-test.scss @@ -474,6 +474,54 @@ color: var(--ats-tone); } +/* ======================================================================== + * Agent chain editor + * + * The expected list of an agentChain assertion. Chips rather than a text field + * because the order is the assertion in `ordered`/`exact` mode, and a chip can + * carry its own move and remove controls. + * ======================================================================== */ + +.ats-chain { + display: flex; + flex-wrap: wrap; + gap: 0.375rem; + margin-bottom: 0.375rem; +} + +/* Inline control inside a chip: sized down to the chip's own line-height so a + chip with three of them stays the height of a plain badge. */ +.ats-chip-btn { + display: inline-flex; + align-items: center; + justify-content: center; + width: 1rem; + height: 1rem; + padding: 0; + border: 0; + border-radius: 0.1875rem; + background: transparent; + color: inherit; + line-height: 1; + + & i { + font-size: 0.875rem; + } + + &:hover:not(:disabled) { + background-color: color-mix(in srgb, var(--ats-tone) 25%, transparent); + } + + &:disabled { + opacity: 0.35; + } +} + +.ats-chip-index { + opacity: 0.7; + font-variant-numeric: tabular-nums; +} + /* ======================================================================== * Alerts (replaces .alert.alert-danger / -warning / -info) * ======================================================================== */ diff --git a/src/routes/page/agent-test/[suiteId]/case/[caseId]/+page.svelte b/src/routes/page/agent-test/[suiteId]/case/[caseId]/+page.svelte index 806c0eaa..c67e4205 100644 --- a/src/routes/page/agent-test/[suiteId]/case/[caseId]/+page.svelte +++ b/src/routes/page/agent-test/[suiteId]/case/[caseId]/+page.svelte @@ -1,5 +1,5 @@