mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-12 22:31:12 -07:00
fix(browser): remove premature browser cleanup after subagent invocation (#24753)
This commit is contained in:
@@ -742,7 +742,7 @@ describe('BrowserAgentInvocation', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should call cleanupBrowserAgent with correct params', async () => {
|
||||
it('should not call cleanupBrowserAgent (cleanup is handled by BrowserManager.resetAll)', async () => {
|
||||
const invocation = new BrowserAgentInvocation(
|
||||
mockConfig,
|
||||
mockParams,
|
||||
@@ -750,11 +750,7 @@ describe('BrowserAgentInvocation', () => {
|
||||
);
|
||||
await invocation.execute(new AbortController().signal, vi.fn());
|
||||
|
||||
expect(cleanupBrowserAgent).toHaveBeenCalledWith(
|
||||
expect.anything(),
|
||||
mockConfig,
|
||||
'persistent',
|
||||
);
|
||||
expect(cleanupBrowserAgent).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -34,10 +34,7 @@ import {
|
||||
isToolActivityError,
|
||||
} from '../types.js';
|
||||
import type { MessageBus } from '../../confirmation-bus/message-bus.js';
|
||||
import {
|
||||
createBrowserAgentDefinition,
|
||||
cleanupBrowserAgent,
|
||||
} from './browserAgentFactory.js';
|
||||
import { createBrowserAgentDefinition } from './browserAgentFactory.js';
|
||||
import { removeInputBlocker } from './inputBlocker.js';
|
||||
import { recordBrowserAgentTaskOutcome } from '../../telemetry/metrics.js';
|
||||
import {
|
||||
@@ -444,7 +441,6 @@ ${output.result}`;
|
||||
} catch {
|
||||
// Ignore errors for removing the overlays.
|
||||
}
|
||||
await cleanupBrowserAgent(browserManager, this.config, sessionMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user