feat: automatic /model persistence across Gemini CLI sessions (#13199)

Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
This commit is contained in:
Niyas Hameed
2025-12-23 19:53:43 +05:30
committed by GitHub
parent 66fab0bea2
commit a1edecaf30
7 changed files with 48 additions and 6 deletions
+12
View File
@@ -1629,6 +1629,18 @@ describe('Config getHooks', () => {
expect(config.getModel()).toBe(originalModel);
expect(config.getActiveModel()).toBe(originalModel);
});
it('should call onModelChange when a new model is set', () => {
const onModelChange = vi.fn();
const config = new Config({
...baseParams,
onModelChange,
});
config.setModel(DEFAULT_GEMINI_MODEL);
expect(onModelChange).toHaveBeenCalledWith(DEFAULT_GEMINI_MODEL);
});
});
});