perf: 优化 Agent 流式会话处理

- 合并流式通知与持久化写入,限制浏览器会话缓存

- 增量投影轮次事件并稳定关联异步工具任务
This commit is contained in:
2026-07-27 19:41:11 +08:00
parent 5497931abd
commit b08eb009bb
10 changed files with 539 additions and 47 deletions

View File

@@ -10,7 +10,7 @@ import type {
AgentToolBinding,
} from '../types';
import { computed, onMounted, ref, watch } from 'vue';
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { ChatTimeline } from '@easyflow/common-ui';
import { BrushCleaning } from '@easyflow/icons';
@@ -39,6 +39,7 @@ const emit = defineEmits<{ close: [] }>();
const {
loading,
clearDraftSession,
dispose,
markToolApproving,
markToolRejected,
copyMessageText,
@@ -80,6 +81,9 @@ async function activateComposer() {
}
onMounted(() => void activateComposer());
onBeforeUnmount(() => {
dispose();
});
watch(
() => [props.agent.id, props.agent.localId],