From 77e4f93e3e90dffc3af6e5ebf60a04bbbbed9659 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 29 Jun 2026 23:58:02 +0800 Subject: [PATCH] Align MCP OAuth and tool approval cards with agent tool timeline UX. Unify inline interaction styling with tool steps: timeline icon placement, shimmer pending state, collapsible JSON args, and lighter status rows. --- frontend/src/i18n/locales/en-US.ts | 2 + frontend/src/i18n/locales/ko-KR.ts | 2 + frontend/src/i18n/locales/ru-RU.ts | 2 + frontend/src/i18n/locales/zh-CN.ts | 2 + .../views/chat/components/McpOAuthCard.vue | 58 +++---- .../chat/components/ToolApprovalCard.vue | 116 +++++++------ .../components/agent-interaction-card.less | 156 +++++++++++++----- 7 files changed, 214 insertions(+), 124 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index cf008865..32fe7b13 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -5036,6 +5036,7 @@ export default { toolApproval: { banner: 'This MCP tool requires human approval. Review parameters before execution.', waiting: 'Awaiting review · {target}', + waitingStatus: 'Awaiting review', targetWithTool: '{service} › {tool}', titleWithTarget: 'Review · {service} › {tool}', resolvedApproved: 'Approved · {target}', @@ -5058,6 +5059,7 @@ export default { mcpOAuth: { banner: 'This MCP service requires OAuth authorization before it can be used', waiting: 'Awaiting authorization · {target}', + waitingStatus: 'Awaiting authorization', targetWithTool: '{service} › {tool}', titleWithService: 'OAuth · {service}', titleWithTool: 'OAuth · {service} › {tool}', diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index 3efeb769..d2db1dfe 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -5053,6 +5053,7 @@ export default { toolApproval: { banner: '이 MCP 도구는 수동 승인이 필요합니다. 실행 전 매개변수를 확인하세요.', waiting: '승인 대기 · {target}', + waitingStatus: '승인 대기', targetWithTool: '{service} › {tool}', titleWithTarget: '검토 · {service} › {tool}', resolvedApproved: '승인됨 · {target}', @@ -5075,6 +5076,7 @@ export default { mcpOAuth: { banner: '이 MCP 서비스는 OAuth 인증 후에 사용할 수 있습니다', waiting: '인증 대기 · {target}', + waitingStatus: '인증 대기', targetWithTool: '{service} › {tool}', titleWithService: 'OAuth · {service}', titleWithTool: 'OAuth · {service} › {tool}', diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index 1221acbc..245eeb8c 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -4553,6 +4553,7 @@ export default { toolApproval: { banner: 'Этот инструмент MCP требует подтверждения. Проверьте параметры.', waiting: 'Ожидание проверки · {target}', + waitingStatus: 'Ожидание проверки', targetWithTool: '{service} › {tool}', titleWithTarget: 'Проверка · {service} › {tool}', resolvedApproved: 'Подтверждено · {target}', @@ -4575,6 +4576,7 @@ export default { mcpOAuth: { banner: 'Этот MCP-сервис требует авторизации OAuth перед использованием', waiting: 'Ожидание авторизации · {target}', + waitingStatus: 'Ожидание авторизации', targetWithTool: '{service} › {tool}', titleWithService: 'OAuth · {service}', titleWithTool: 'OAuth · {service} › {tool}', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index 80f587cb..924e5e8a 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -5049,6 +5049,7 @@ export default { toolApproval: { banner: "该 MCP 工具已标记为「需人工审核」,确认参数后再执行", waiting: "等待审核 · {target}", + waitingStatus: "等待审核", targetWithTool: "{service} › {tool}", titleWithTarget: "人工审核 · {service} › {tool}", resolvedApproved: "已通过 · {target}", @@ -5071,6 +5072,7 @@ export default { mcpOAuth: { banner: "该 MCP 服务需要 OAuth 授权后才能调用", waiting: "等待授权 · {target}", + waitingStatus: "等待授权", targetWithTool: "{service} › {tool}", titleWithService: "OAuth 授权 · {service}", titleWithTool: "OAuth 授权 · {service} › {tool}", diff --git a/frontend/src/views/chat/components/McpOAuthCard.vue b/frontend/src/views/chat/components/McpOAuthCard.vue index 6fb262dc..384fa2d4 100644 --- a/frontend/src/views/chat/components/McpOAuthCard.vue +++ b/frontend/src/views/chat/components/McpOAuthCard.vue @@ -1,35 +1,30 @@