mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 21:14:35 -07:00
feat(core, cli): Add auth type to history checkpoint. (#13023)
This commit is contained in:
@@ -495,39 +495,6 @@ describe('useSlashCommandProcessor', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should strip thoughts when handling "load_history" action', async () => {
|
||||
const mockClient = {
|
||||
setHistory: vi.fn(),
|
||||
stripThoughtsFromHistory: vi.fn(),
|
||||
} as unknown as GeminiClient;
|
||||
vi.spyOn(mockConfig, 'getGeminiClient').mockReturnValue(mockClient);
|
||||
|
||||
const historyWithThoughts = [
|
||||
{
|
||||
role: 'model',
|
||||
parts: [{ text: 'response', thoughtSignature: 'CikB...' }],
|
||||
},
|
||||
];
|
||||
const command = createTestCommand({
|
||||
name: 'loadwiththoughts',
|
||||
action: vi.fn().mockResolvedValue({
|
||||
type: 'load_history',
|
||||
history: [{ type: MessageType.GEMINI, text: 'response' }],
|
||||
clientHistory: historyWithThoughts,
|
||||
}),
|
||||
});
|
||||
|
||||
const result = await setupProcessorHook([command]);
|
||||
await waitFor(() => expect(result.current.slashCommands).toHaveLength(1));
|
||||
|
||||
await act(async () => {
|
||||
await result.current.handleSlashCommand('/loadwiththoughts');
|
||||
});
|
||||
|
||||
expect(mockClient.setHistory).toHaveBeenCalledTimes(1);
|
||||
expect(mockClient.stripThoughtsFromHistory).toHaveBeenCalledWith();
|
||||
});
|
||||
|
||||
it('should handle a "quit" action', async () => {
|
||||
const quitAction = vi
|
||||
.fn()
|
||||
|
||||
Reference in New Issue
Block a user