fix(core): prevent duplicate tool approval entries in auto-saved.toml (#19487)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Abhijit Balaji
2026-02-19 12:03:52 -08:00
committed by GitHub
parent c276d0c7b6
commit 3408542a66
11 changed files with 39 additions and 62 deletions
+3 -4
View File
@@ -390,7 +390,7 @@ describe('WebFetchTool', () => {
expect(confirmationDetails).toBe(false);
});
it('should call setApprovalMode when onConfirm is called with ProceedAlways', async () => {
it('should NOT call setApprovalMode when onConfirm is called with ProceedAlways (now handled by scheduler)', async () => {
const tool = new WebFetchTool(mockConfig, bus);
const params = { prompt: 'fetch https://example.com' };
const invocation = tool.build(params);
@@ -408,9 +408,8 @@ describe('WebFetchTool', () => {
);
}
expect(mockConfig.setApprovalMode).toHaveBeenCalledWith(
ApprovalMode.AUTO_EDIT,
);
// Schedulers are now responsible for mode transitions via updatePolicy
expect(mockConfig.setApprovalMode).not.toHaveBeenCalled();
});
});