Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix: channel local unstable

Gus7e29942c5718
diff --git a/src/web/src/components/agent-chat/agent-chat-view.tsx b/src/web/src/components/agent-chat/agent-chat-view.tsx
index c5a7c9264..52b0c07d4 100644
--- a/src/web/src/components/agent-chat/agent-chat-view.tsx
+++ b/src/web/src/components/agent-chat/agent-chat-view.tsx
@@ -360,7 +360,6 @@ export function AgentChatView({
useEffect(() => {
setChannelAgentId(agentId);
- return () => setChannelAgentId(null);
}, [agentId, setChannelAgentId]);
const handleSpeechResult = useCallback((text: string) => {
diff --git a/src/web/src/contexts/channel-context.tsx b/src/web/src/contexts/channel-context.tsx
index 268dd1845..098f96572 100644
--- a/src/web/src/contexts/channel-context.tsx
+++ b/src/web/src/contexts/channel-context.tsx
@@ -64,6 +64,7 @@ export function ChannelProvider({
useEffect(() => {
if (typeof window === "undefined") return;
+ if (!agentId) return;
const stored = localStorage.getItem(storageKey(workspaceId, agentId));
setActiveChannelState(stored ?? "default");
}, [workspaceId, agentId]);