diff --git a/web/src/components/AgentChatComponent.vue b/web/src/components/AgentChatComponent.vue index 4235d46a..9c07c1f6 100644 --- a/web/src/components/AgentChatComponent.vue +++ b/web/src/components/AgentChatComponent.vue @@ -68,7 +68,7 @@ 状态 - + @@ -1043,7 +1043,7 @@ watch(conversations, () => { .floating-sidebar { position: absolute !important; - z-index: 101; + z-index: 1001; height: 100%; left: 0; top: 0; diff --git a/web/src/components/ToolCallingResult/BaseToolCall.vue b/web/src/components/ToolCallingResult/BaseToolCall.vue index cdef9827..0a911f08 100644 --- a/web/src/components/ToolCallingResult/BaseToolCall.vue +++ b/web/src/components/ToolCallingResult/BaseToolCall.vue @@ -21,32 +21,40 @@
- - 工具  {{ toolName }}   执行完成 - + + - - 工具  {{ toolName }}   执行失败 - ({{ toolCall.error_message }}) - + +
@@ -264,6 +272,21 @@ const formatResultData = (data) => { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + + :deep(.keywords) { + color: var(--main-700); + font-weight: 600; + font-size: 14px; + } + + :deep(.tag) { + font-size: 12px; + color: var(--gray-600); + background-color: var(--gray-100); + padding: 0px 4px; + border-radius: 4px; + margin-left: 8px; + } } } diff --git a/web/src/components/ToolCallingResult/ToolCallRenderer.vue b/web/src/components/ToolCallingResult/ToolCallRenderer.vue index d0cb1fd1..f1a99c7d 100644 --- a/web/src/components/ToolCallingResult/ToolCallRenderer.vue +++ b/web/src/components/ToolCallingResult/ToolCallRenderer.vue @@ -21,6 +21,9 @@ + + + @@ -36,6 +39,7 @@ import KnowledgeGraphTool from './tools/KnowledgeGraphTool.vue'; import CalculatorTool from './tools/CalculatorTool.vue'; import TodoListTool from './tools/TodoListTool.vue'; import ImageTool from './tools/ImageTool.vue'; +import TaskTool from './tools/TaskTool.vue'; const props = defineProps({ toolCall: { @@ -63,10 +67,19 @@ const parseData = (content) => { // 识别逻辑 const isWebSearchResult = computed(() => { const name = toolName.value.toLowerCase(); - const isWebSearchTool = name.includes('search') || name.includes('tavily') || name.includes('web'); - if (!isWebSearchTool) return false; - const data = parseData(props.toolCall.tool_call_result?.content); - return data && typeof data === 'object' && 'results' in data && Array.isArray(data.results); + return name.includes('search') || name.includes('tavily') || name.includes('web'); +}); + +const isTaskResult = computed(() => { + let args = props.toolCall.args || props.toolCall.function?.arguments; + if (typeof args === 'string') { + try { + args = JSON.parse(args); + } catch { + return false; + } + } + return args && typeof args === 'object' && 'subagent_type' in args; }); const isKnowledgeBaseResult = computed(() => { diff --git a/web/src/components/ToolCallingResult/tools/TaskTool.vue b/web/src/components/ToolCallingResult/tools/TaskTool.vue new file mode 100644 index 00000000..88cc409d --- /dev/null +++ b/web/src/components/ToolCallingResult/tools/TaskTool.vue @@ -0,0 +1,107 @@ + + + + + diff --git a/web/src/components/ToolCallingResult/tools/TodoListTool.vue b/web/src/components/ToolCallingResult/tools/TodoListTool.vue index ceb7942e..b7ab412e 100644 --- a/web/src/components/ToolCallingResult/tools/TodoListTool.vue +++ b/web/src/components/ToolCallingResult/tools/TodoListTool.vue @@ -1,9 +1,7 @@