mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 03:54:43 -07:00
fix(core): enable global session and persistent approval for web_fetch (#23295)
Co-authored-by: Spencer <spencertang@google.com>
This commit is contained in:
@@ -752,6 +752,24 @@ describe('WebFetchTool', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getPolicyUpdateOptions', () => {
|
||||
it('should return empty object for any outcome to allow global approval', () => {
|
||||
const tool = new WebFetchTool(mockConfig, bus);
|
||||
const invocation = tool.build({ prompt: 'fetch https://example.com' });
|
||||
|
||||
expect(
|
||||
invocation.getPolicyUpdateOptions!(
|
||||
ToolConfirmationOutcome.ProceedAlways,
|
||||
),
|
||||
).toEqual({});
|
||||
expect(
|
||||
invocation.getPolicyUpdateOptions!(
|
||||
ToolConfirmationOutcome.ProceedAlwaysAndSave,
|
||||
),
|
||||
).toEqual({});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Message Bus Integration', () => {
|
||||
let policyEngine: PolicyEngine;
|
||||
let messageBus: MessageBus;
|
||||
|
||||
Reference in New Issue
Block a user