fix: 修复 AI 响应内容重复显示问题

- 完成标记不再重复发送 segments,避免内容在前端重复显示
   - 移除调试日志
This commit is contained in:
Roe-xin
2026-03-02 19:25:25 +08:00
parent 1c66e0e599
commit 373edb6d80

View File

@ -365,13 +365,12 @@ async function handleUserMessageWithBackend(
command: "hideStatus",
});
// 最后一次发送完整的段落
const result = await panel.webview.postMessage({
// 发送完成标记(不再重复发送 segments避免内容重复显示
panel.webview.postMessage({
command: "updateSegments",
segments: segments,
segments: [],
isComplete: true,
});
console.log("[MessageHandler] postMessage 返回值:", result);
// 发送系统通知 - AI 响应完成
const notificationService = NotificationService.getInstance();