問題
訊息送出後無法中止 agent 的回應,只能等它說完,無法像 Gemini 一樣手動停止再重送指令。
現況
src/hooks/useChat.ts 已有 stopGeneration()(呼叫 abortControllers.get(sessionId)?.abort()),但 UI 上沒有對應的按鈕。
修法方向
修改 src/components/ChatInput.tsx,接收 isStreaming 與 onStop prop:
isStreaming === true 時,將右下角的 send button 改為 stop button
- 點擊 stop button 時呼叫
stopGeneration()
來源
20260428 會議記錄(點 2,Phase 1 blocker)
問題
訊息送出後無法中止 agent 的回應,只能等它說完,無法像 Gemini 一樣手動停止再重送指令。
現況
src/hooks/useChat.ts已有stopGeneration()(呼叫abortControllers.get(sessionId)?.abort()),但 UI 上沒有對應的按鈕。修法方向
修改
src/components/ChatInput.tsx,接收isStreaming與onStopprop:isStreaming === true時,將右下角的 send button 改為 stop buttonstopGeneration()來源
20260428 會議記錄(點 2,Phase 1 blocker)