From 61d4bbf9ea1eaa85285f99730fa31f21d5e8daa5 Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Thu, 26 Mar 2026 12:13:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=BC=BA=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=BB=93=E6=9E=9C=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20grep=20=E5=B7=A5=E5=85=B7=E6=94=AF?= =?UTF-8?q?=E6=8C=81=EF=BC=8C=E4=BC=98=E5=8C=96=E5=B7=A5=E5=85=B7=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E6=98=A0=E5=B0=84=E5=92=8C=E6=B8=B2=E6=9F=93=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/develop-guides/roadmap.md | 1 + web/src/assets/css/extensions.less | 47 ++++- web/src/components/AgentChatComponent.vue | 1 - web/src/components/AgentInputArea.vue | 2 +- web/src/components/AgentPanel.vue | 10 +- .../ToolCallingResult/BaseToolCall.vue | 71 +------ .../ToolCallingResult/ToolCallRenderer.vue | 178 ++++------------ .../ToolCallingResult/toolRegistry.js | 48 +++++ .../ToolCallingResult/tools/GrepTool.vue | 195 ++++++++++++++++++ web/src/components/ToolsManagerComponent.vue | 10 +- 10 files changed, 351 insertions(+), 212 deletions(-) create mode 100644 web/src/components/ToolCallingResult/toolRegistry.js create mode 100644 web/src/components/ToolCallingResult/tools/GrepTool.vue diff --git a/docs/develop-guides/roadmap.md b/docs/develop-guides/roadmap.md index 6de89e52..57ad922b 100644 --- a/docs/develop-guides/roadmap.md +++ b/docs/develop-guides/roadmap.md @@ -48,6 +48,7 @@ ### 修复 - 为沙盒与 viewer 文件系统补齐知识库只读映射:新增 `/home/gem/kbs` 命名空间,按“用户可访问知识库 ∩ 当前 Agent 已启用知识库”暴露原始文件与解析后的 Markdown,并补充对应后端与 viewer 路由测试 +- 修复前端工具图标与渲染匹配不准确的问题:工具管理列表与工具调用结果统一改为基于工具 `id` 的精确映射,避免模糊匹配导致的误渲染,未命中的工具不再显示默认扳手图标 diff --git a/web/src/assets/css/extensions.less b/web/src/assets/css/extensions.less index 45b46a64..134006da 100644 --- a/web/src/assets/css/extensions.less +++ b/web/src/assets/css/extensions.less @@ -31,11 +31,50 @@ flex-shrink: 0; .search-box { - padding: 12px 12px 0; + padding: 8px 12px 0; + + :deep(.ant-input-affix-wrapper) { + height: 28px; + padding: 0 12px; + // border: none; + border-radius: 8px; + background-color: var(--gray-0); + box-shadow: none; + + &:hover, + &:focus, + &.ant-input-affix-wrapper-focused { + // border: none; + box-shadow: none; + } + } + + :deep(.ant-input-prefix) { + margin-right: 8px; + color: var(--gray-400); + } + + :deep(.ant-input) { + height: 100%; + background-color: transparent; + } + + :deep(.ant-input::placeholder) { + color: var(--gray-400); + } + + :deep(.ant-input-clear-icon) { + color: var(--gray-400); + } + + :deep(.ant-input-clear-icon:hover) { + color: var(--gray-500); + } + + // :deep(.ant-input-outlined) { + // border: none; + // } - .search-input :deep(.ant-input) { - height: 28px; - } } .list-container { diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index 0834669a..2fbdc3b2 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -155,7 +155,6 @@ :is-loading="isProcessing" :disabled="!currentAgent" :send-button-disabled="isSendButtonDisabled" - placeholder="输入问题..." :mention="mentionConfig" :supports-file-upload="supportsFileUpload" :is-panel-open="isAgentPanelOpen" diff --git a/web/src/components/AgentInputArea.vue b/web/src/components/AgentInputArea.vue index bb9e3b4a..1505b803 100644 --- a/web/src/components/AgentInputArea.vue +++ b/web/src/components/AgentInputArea.vue @@ -63,7 +63,6 @@ const props = defineProps({ isLoading: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, sendButtonDisabled: { type: Boolean, default: false }, - placeholder: { type: String, default: '输入问题...' }, mention: { type: Object, default: () => null }, supportsFileUpload: { type: Boolean, default: false }, isPanelOpen: { type: Boolean, default: false }, @@ -80,6 +79,7 @@ const emit = defineEmits([ const inputRef = ref(null) const currentImage = ref(null) +const placeholder = '问点什么?使用 @ 可以提及哦~' const updateValue = (val) => { emit('update:modelValue', val) diff --git a/web/src/components/AgentPanel.vue b/web/src/components/AgentPanel.vue index f302edb1..c47b39a2 100644 --- a/web/src/components/AgentPanel.vue +++ b/web/src/components/AgentPanel.vue @@ -141,7 +141,7 @@ -
+