diff --git a/src/pages/TaskAssistant.tsx b/src/pages/TaskAssistant.tsx
index 9a00398..b366617 100644
--- a/src/pages/TaskAssistant.tsx
+++ b/src/pages/TaskAssistant.tsx
@@ -1,7 +1,7 @@
import { useState, useRef, useEffect, useCallback } from 'react'
import { Input, Button, theme, Typography, App } from 'antd'
import {
- SendOutlined, RobotOutlined, PlusOutlined,
+ SendOutlined, RobotOutlined, PlusOutlined, ToolOutlined,
DeleteOutlined, StopOutlined, MessageOutlined,
} from '@ant-design/icons'
import { streamChat, type StreamEvent } from '@/services/ai-chat'
@@ -19,6 +19,7 @@ interface Message {
content: string
timestamp: number
streaming?: boolean
+ toolCalls?: { tool: string; preview?: string; done: boolean; duration?: number; error?: boolean }[]
}
function ChatPage() {
@@ -123,6 +124,14 @@ function ChatPage() {
completedConvId = event.conversationId
if (event.conversationId && event.conversationId !== activeId) { setActiveId(event.conversationId); loadConversations() }
break
+ case 'tool.started':
+ currentTools.push({ tool: event.tool, preview: event.preview, done: false })
+ update({ toolCalls: [...currentTools] })
+ break
+ case 'tool.completed':
+ const idx = currentTools.findIndex((t: any) => t.tool === event.tool && !t.done)
+ if (idx >= 0) { currentTools[idx] = { ...currentTools[idx], done: true, duration: event.duration, error: event.error }; update({ toolCalls: [...currentTools] }) }
+ break
case 'message.delta':
currentContent += event.delta || ''
update({ content: currentContent, streaming: true })
@@ -198,6 +207,15 @@ function ChatPage() {
: