perf: 优化 Agent 流式会话处理
- 合并流式通知与持久化写入,限制浏览器会话缓存 - 增量投影轮次事件并稳定关联异步工具任务
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user