chore: 清理死代码,retry handler 工具卡片渲染补全
- 移除 agent-engine.ts 中未使用的 logThink 导入 - 移除 settings-modal.ts 中未使用的 isVectorMemoryEnabled 导入 - 修复 retry handler 中 onToolCallStart/onToolCallResult/onToolCallError 空回调
This commit is contained in:
@@ -286,9 +286,24 @@ async function handleRetry(): Promise<void> {
|
||||
await runAgentLoop(userMsg.content || '', userMsg.images || [], historyMessages, {
|
||||
onThinking: (thinking) => updateLastAssistantMessage('', thinking, null),
|
||||
onContent: (content) => updateLastAssistantMessage(content, null, null),
|
||||
onToolCallStart: () => {},
|
||||
onToolCallResult: () => {},
|
||||
onToolCallError: () => {},
|
||||
onToolCallStart: (call) => {
|
||||
appendToolCallCardToPlaceholder({
|
||||
name: call.function.name, arguments: call.function.arguments,
|
||||
result: null, status: 'running', timestamp: Date.now()
|
||||
});
|
||||
},
|
||||
onToolCallResult: (name, result, call) => {
|
||||
updateToolCallCardInPlaceholder({
|
||||
name, arguments: call.function.arguments,
|
||||
result, status: result.success ? 'success' : 'error', timestamp: Date.now()
|
||||
});
|
||||
},
|
||||
onToolCallError: (name, error, call) => {
|
||||
updateToolCallCardInPlaceholder({
|
||||
name, arguments: call.function.arguments,
|
||||
result: { success: false, error }, status: 'error', timestamp: Date.now()
|
||||
});
|
||||
},
|
||||
onConfirmTool: async (call) => showToolConfirm(call),
|
||||
onDone: async (finalContent, toolRecords, loopStats) => {
|
||||
const assistantMsg: ChatMessage = {
|
||||
|
||||
Reference in New Issue
Block a user