From c7ae406dcc847c4d1303da644c57b7d678859dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=AA=E7=A8=8B=E4=BC=9F?= Date: Mon, 8 Jun 2026 00:22:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E6=95=B0=E5=AD=97=E5=91=98?= =?UTF-8?q?=E5=B7=A5=E6=A0=87=E7=AD=BE=E6=94=B9=E4=B8=BA=E8=8A=AF=E7=89=87?= =?UTF-8?q?=E5=BC=8F=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将编辑弹窗的标签输入从逗号分隔文本框改为芯片编辑器:每个标签独立 展示并带 × 删除,回车/空格/逗号(含全角「,」)添加,自动去重 + trim。 输入法选词态的回车不会误提交半成品;删除后提供 5 秒内联撤销。 form.tags 仍为逗号分隔字符串,后端零改动、API 契约不变。Closes #145. --- mateclaw-ui/src/i18n/locales/en-US.ts | 5 +- mateclaw-ui/src/i18n/locales/zh-CN.ts | 5 +- mateclaw-ui/src/views/Agents.vue | 105 +++++++++++++++++++++++++- 3 files changed, 111 insertions(+), 4 deletions(-) diff --git a/mateclaw-ui/src/i18n/locales/en-US.ts b/mateclaw-ui/src/i18n/locales/en-US.ts index 11394990..e9568074 100644 --- a/mateclaw-ui/src/i18n/locales/en-US.ts +++ b/mateclaw-ui/src/i18n/locales/en-US.ts @@ -1231,6 +1231,8 @@ export default { modelGlobalDefault: 'Use global default', modelHint: 'Override the global default model for this employee. Leave blank to follow Settings → Models.', tags: 'Tags', + tagsHint: 'Press Enter, space, or comma to add; click the × on a chip to remove.', + tagUndo: 'Undo', enabled: 'Enabled', }, thinkingLevels: { @@ -1261,7 +1263,7 @@ export default { goal: 'e.g. Turn data into actionable insights', backstory: 'e.g. Spent 10 years in data — believes in asking the right question before writing SQL...', extraInstructions: 'Optional: output format, process checklist, or boundary rules...', - tags: 'tag1,tag2', + tags: 'Enter, space, or comma to add', workspaceBasePath: 'e.g. projects/code-review', }, messages: { @@ -1272,6 +1274,7 @@ export default { saveFailed: 'Failed to save employee', saveSuccess: 'Employee saved', deleteFailed: 'Failed to delete employee', + tagRemoved: 'Removed tag "{tag}"', deleteSuccess: 'Employee let go', toggleFailed: 'Failed to toggle status', toggleSuccess: 'Status updated', diff --git a/mateclaw-ui/src/i18n/locales/zh-CN.ts b/mateclaw-ui/src/i18n/locales/zh-CN.ts index 346f48c6..0d58b607 100644 --- a/mateclaw-ui/src/i18n/locales/zh-CN.ts +++ b/mateclaw-ui/src/i18n/locales/zh-CN.ts @@ -1123,6 +1123,8 @@ export default { modelGlobalDefault: '使用全局默认模型', modelHint: '为该员工单独指定模型,留空则跟随「设置 → 模型」中的全局默认。', tags: '标签', + tagsHint: '输入后按回车、空格或逗号添加;点芯片上的 × 删除。', + tagUndo: '撤销', enabled: '启用', }, thinkingLevels: { @@ -1153,7 +1155,7 @@ export default { goal: '例:把数据变成可执行洞察', backstory: '例:在数据里待了十年,相信先问对问题再写 SQL...', extraInstructions: '可选:补充输出格式、流程清单或边界规则...', - tags: 'tag1,tag2', + tags: '回车、空格或逗号添加', workspaceBasePath: '例如:projects/code-review', }, messages: { @@ -1164,6 +1166,7 @@ export default { saveFailed: '保存员工失败', saveSuccess: '员工已保存', deleteFailed: '删除员工失败', + tagRemoved: '已移除标签「{tag}」', deleteSuccess: '员工已离职', toggleFailed: '切换状态失败', toggleSuccess: '状态已更新', diff --git a/mateclaw-ui/src/views/Agents.vue b/mateclaw-ui/src/views/Agents.vue index b12b5008..06f3d3b1 100644 --- a/mateclaw-ui/src/views/Agents.vue +++ b/mateclaw-ui/src/views/Agents.vue @@ -349,7 +349,29 @@
- +
+ + {{ tag }} + + + +
+

+ + +

@@ -637,7 +659,7 @@