fix(agent): implement AgentProtocol disposal to prevent memory leaks

This commit is contained in:
Michael Bleigh
2026-05-11 14:56:10 -07:00
parent a7ae31d732
commit aa8eca7bfe
6 changed files with 26 additions and 11 deletions
+4
View File
@@ -1180,6 +1180,10 @@ Logging in with Google... Restarting Gemini CLI to continue.
[config, getPreferredEditor],
);
useEffect(() => () => {
streamAgent?.dispose?.();
}, [streamAgent]);
const activeStream = streamAgent
? // eslint-disable-next-line react-hooks/rules-of-hooks
useAgentStream({