|
|
@@ -564,6 +564,14 @@ export function useAiChat() {
|
|
|
if (payload.sessionId) {
|
|
|
currentSessionId.value = payload.sessionId
|
|
|
}
|
|
|
+ // turn 结束:将所有仍在 running 的 tool call 标记为完成
|
|
|
+ if (aiMessage.toolCalls) {
|
|
|
+ for (const tc of aiMessage.toolCalls) {
|
|
|
+ if (tc.status === 'running') {
|
|
|
+ tc.status = 'completed'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 最终扫描:处理跨 chunk 的标记
|
|
|
extractFileDownloads(aiMessage)
|
|
|
break
|