mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-13 11:30:39 -07:00
fix(agent): implement AgentProtocol disposal to prevent memory leaks
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user