feat(agent): update agent connection behavior to start with a blank conversation and allow user-initiated session restoration

This commit is contained in:
HouYunFei
2026-07-29 14:16:35 +08:00
parent 0526290c8f
commit eda3481533
16 changed files with 2016 additions and 1910 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ export const useAgentStore = create<AgentStore>((set, get) => ({
}
localStorage.setItem("canvas-agent-url", endpoint);
localStorage.setItem("canvas-agent-token", token);
// 只设 enabled=true,由 CanvasLocalAgentPanel 的 useEffect 统一负责开 SSE
// 只设 enabled=true,由 LocalAgentPanel 的 useEffect 统一负责开 SSE
set({ url: endpoint, token, enabled: true, silentConnect: silent, activity: "连接中", connectError: "" });
},
disconnectAgent: (patch = {}) => {