重构: CR-11 composables+ToolCard 健壮性 6 子项

⑦ useAiConversations JSON.parse 逐条 try/catch 容错(坏条降级不清空整对话);⑧ ToolCard 去 as any + argString 安全取字段;⑨ useAiSend approveToolCall 复用 findToolCall;⑩ useAiEvents 补 AiHeartbeat case 防穿透;⑪ approveHumanApproval 签名收敛(decisions:string[] + select_type 判单/多选)+ ProjectDetail 调用方同步(单选包数组/多选直传);⑫ ToolCard formatBytes/formatToolName/argString 兜底。批5 ww1mh6mry,vue-tsc 0
This commit is contained in:
2026-06-15 05:45:04 +08:00
parent 0e196ee86f
commit fddca9daf1
6 changed files with 68 additions and 31 deletions

View File

@@ -127,6 +127,10 @@ export function handleEvent(event: AiChatEvent) {
break
}
case 'AiHeartbeat':
// 心跳事件:仅维持看门狗(已在上方 reset),无需额外处理;显式 case 防 switch 穿透
break
case 'AiToolCallStarted': {
const info: AiToolCallInfo = {
id: event.id,