@google/gemini-cli 0.15.0-nightly.20251111.51f952e7 → 0.15.0-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +2 -2
- package/dist/src/config/config.d.ts +3 -0
- package/dist/src/config/config.js +31 -0
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +20 -0
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/extension-manager.js +13 -1
- package/dist/src/config/extension-manager.js.map +1 -1
- package/dist/src/config/extension.test.js +65 -0
- package/dist/src/config/extension.test.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +10 -1
- package/dist/src/config/settingsSchema.js +10 -1
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/gemini.d.ts +2 -2
- package/dist/src/gemini.js +35 -4
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +14 -7
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/nonInteractiveCli.d.ts +3 -2
- package/dist/src/nonInteractiveCli.js +6 -1
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/nonInteractiveCli.test.js +1 -0
- package/dist/src/nonInteractiveCli.test.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +2 -1
- package/dist/src/test-utils/render.js +13 -3
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.js +9 -1
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/App.test.js +25 -1
- package/dist/src/ui/App.test.js.map +1 -1
- package/dist/src/ui/AppContainer.d.ts +2 -3
- package/dist/src/ui/AppContainer.js +22 -7
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +349 -46
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +4 -1
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.js +24 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +101 -0
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js.map +1 -0
- package/dist/src/ui/components/Composer.js +11 -4
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/CopyModeWarning.d.ts +7 -0
- package/dist/src/ui/components/CopyModeWarning.js +12 -0
- package/dist/src/ui/components/CopyModeWarning.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +1 -1
- package/dist/src/ui/components/Header.js +11 -1
- package/dist/src/ui/components/Header.js.map +1 -1
- package/dist/src/ui/components/Header.test.js +69 -14
- package/dist/src/ui/components/Header.test.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +43 -41
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +2 -0
- package/dist/src/ui/components/InputPrompt.js +14 -8
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/MainContent.js +52 -15
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +1 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -1
- package/dist/src/ui/components/StickyHeader.d.ts +11 -0
- package/dist/src/ui/components/StickyHeader.js +5 -0
- package/dist/src/ui/components/StickyHeader.js.map +1 -0
- package/dist/src/ui/components/StickyHeader.test.d.ts +6 -0
- package/dist/src/ui/components/StickyHeader.test.js +17 -0
- package/dist/src/ui/components/StickyHeader.test.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.js +11 -3
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.js +129 -89
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.test.js +107 -115
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessage.js +3 -1
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
- package/dist/src/ui/components/messages/GeminiMessageContent.js +3 -1
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +152 -121
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +5 -7
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +1 -5
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +39 -16
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js +33 -4
- package/dist/src/ui/components/messages/ToolMessageRawMarkdown.test.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.d.ts +1 -0
- package/dist/src/ui/components/messages/UserMessage.js +2 -2
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/shared/ScrollableList.test.js +61 -24
- package/dist/src/ui/components/shared/ScrollableList.test.js.map +1 -1
- package/dist/src/ui/components/shared/VirtualizedList.js +1 -1
- package/dist/src/ui/components/shared/VirtualizedList.js.map +1 -1
- package/dist/src/ui/constants.d.ts +1 -0
- package/dist/src/ui/constants.js +5 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +1 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/useAlternateBuffer.d.ts +6 -0
- package/dist/src/ui/hooks/useAlternateBuffer.js +11 -0
- package/dist/src/ui/hooks/useAlternateBuffer.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js +4 -0
- package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.js +2 -9
- package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.d.ts +18 -0
- package/dist/src/ui/hooks/useSessionBrowser.js +152 -0
- package/dist/src/ui/hooks/useSessionBrowser.js.map +1 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.js +544 -0
- package/dist/src/ui/hooks/useSessionBrowser.test.js.map +1 -0
- package/dist/src/ui/hooks/useSessionResume.d.ts +30 -0
- package/dist/src/ui/hooks/useSessionResume.js +56 -0
- package/dist/src/ui/hooks/useSessionResume.js.map +1 -0
- package/dist/src/ui/hooks/useSessionResume.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSessionResume.test.js +325 -0
- package/dist/src/ui/hooks/useSessionResume.test.js.map +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.js +9 -3
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +11 -3
- package/dist/src/ui/utils/CodeColorizer.js +18 -9
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +32 -6
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/ui-sizing.js +9 -3
- package/dist/src/ui/utils/ui-sizing.js.map +1 -1
- package/dist/src/utils/cleanup.test.js +1 -1
- package/dist/src/utils/cleanup.test.js.map +1 -1
- package/dist/src/utils/sessionCleanup.test.js +76 -0
- package/dist/src/utils/sessionCleanup.test.js.map +1 -1
- package/dist/src/utils/sessionUtils.d.ts +54 -0
- package/dist/src/utils/sessionUtils.js +141 -1
- package/dist/src/utils/sessionUtils.js.map +1 -1
- package/dist/src/utils/sessionUtils.test.d.ts +6 -0
- package/dist/src/utils/sessionUtils.test.js +260 -0
- package/dist/src/utils/sessionUtils.test.js.map +1 -0
- package/dist/src/utils/sessions.d.ts +8 -0
- package/dist/src/utils/sessions.js +64 -0
- package/dist/src/utils/sessions.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/google-gemini-cli-0.15.0-nightly.20251107.b8eeb553.tgz +0 -0
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { convertSessionToHistoryFormats } from './useSessionBrowser.js';
|
|
7
|
+
import { MessageType, ToolCallStatus } from '../types.js';
|
|
8
|
+
describe('convertSessionToHistoryFormats', () => {
|
|
9
|
+
it('should convert empty messages array', () => {
|
|
10
|
+
const result = convertSessionToHistoryFormats([]);
|
|
11
|
+
expect(result.uiHistory).toEqual([]);
|
|
12
|
+
expect(result.clientHistory).toEqual([]);
|
|
13
|
+
});
|
|
14
|
+
it('should convert basic user and gemini messages', () => {
|
|
15
|
+
const messages = [
|
|
16
|
+
{
|
|
17
|
+
id: 'msg-1',
|
|
18
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
19
|
+
content: 'Hello',
|
|
20
|
+
type: 'user',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'msg-2',
|
|
24
|
+
timestamp: '2025-01-01T00:02:00Z',
|
|
25
|
+
content: 'Hi there!',
|
|
26
|
+
type: 'gemini',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
30
|
+
expect(result.uiHistory).toHaveLength(2);
|
|
31
|
+
expect(result.uiHistory[0]).toEqual({
|
|
32
|
+
type: MessageType.USER,
|
|
33
|
+
text: 'Hello',
|
|
34
|
+
});
|
|
35
|
+
expect(result.uiHistory[1]).toEqual({
|
|
36
|
+
type: MessageType.GEMINI,
|
|
37
|
+
text: 'Hi there!',
|
|
38
|
+
});
|
|
39
|
+
expect(result.clientHistory).toHaveLength(2);
|
|
40
|
+
expect(result.clientHistory[0]).toEqual({
|
|
41
|
+
role: 'user',
|
|
42
|
+
parts: [{ text: 'Hello' }],
|
|
43
|
+
});
|
|
44
|
+
expect(result.clientHistory[1]).toEqual({
|
|
45
|
+
role: 'model',
|
|
46
|
+
parts: [{ text: 'Hi there!' }],
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
it('should filter out slash commands from client history', () => {
|
|
50
|
+
const messages = [
|
|
51
|
+
{
|
|
52
|
+
id: 'msg-1',
|
|
53
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
54
|
+
content: '/help',
|
|
55
|
+
type: 'user',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'msg-2',
|
|
59
|
+
timestamp: '2025-01-01T00:02:00Z',
|
|
60
|
+
content: '?quit',
|
|
61
|
+
type: 'user',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'msg-3',
|
|
65
|
+
timestamp: '2025-01-01T00:03:00Z',
|
|
66
|
+
content: 'Regular message',
|
|
67
|
+
type: 'user',
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
71
|
+
// All messages should appear in UI history
|
|
72
|
+
expect(result.uiHistory).toHaveLength(3);
|
|
73
|
+
// Only non-slash commands should appear in client history
|
|
74
|
+
expect(result.clientHistory).toHaveLength(1);
|
|
75
|
+
expect(result.clientHistory[0]).toEqual({
|
|
76
|
+
role: 'user',
|
|
77
|
+
parts: [{ text: 'Regular message' }],
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
it('should handle tool calls correctly', () => {
|
|
81
|
+
const messages = [
|
|
82
|
+
{
|
|
83
|
+
id: 'msg-1',
|
|
84
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
85
|
+
content: "I'll help you with that.",
|
|
86
|
+
type: 'gemini',
|
|
87
|
+
toolCalls: [
|
|
88
|
+
{
|
|
89
|
+
id: 'tool-1',
|
|
90
|
+
name: 'bash',
|
|
91
|
+
displayName: 'Execute Command',
|
|
92
|
+
description: 'Run bash command',
|
|
93
|
+
args: { command: 'ls -la' },
|
|
94
|
+
status: 'success',
|
|
95
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
96
|
+
resultDisplay: 'total 4\ndrwxr-xr-x 2 user user 4096 Jan 1 00:00 .',
|
|
97
|
+
renderOutputAsMarkdown: false,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'tool-2',
|
|
101
|
+
name: 'read',
|
|
102
|
+
displayName: 'Read File',
|
|
103
|
+
description: 'Read file contents',
|
|
104
|
+
args: { path: '/etc/hosts' },
|
|
105
|
+
status: 'error',
|
|
106
|
+
timestamp: '2025-01-01T00:01:45Z',
|
|
107
|
+
resultDisplay: 'Permission denied',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
113
|
+
expect(result.uiHistory).toHaveLength(2); // text message + tool group
|
|
114
|
+
expect(result.uiHistory[0]).toEqual({
|
|
115
|
+
type: MessageType.GEMINI,
|
|
116
|
+
text: "I'll help you with that.",
|
|
117
|
+
});
|
|
118
|
+
expect(result.uiHistory[1].type).toBe('tool_group');
|
|
119
|
+
// This if-statement is only necessary because TypeScript can't tell that the toBe() assertion
|
|
120
|
+
// protects the .tools access below.
|
|
121
|
+
if (result.uiHistory[1].type === 'tool_group') {
|
|
122
|
+
expect(result.uiHistory[1].tools).toHaveLength(2);
|
|
123
|
+
expect(result.uiHistory[1].tools[0]).toEqual({
|
|
124
|
+
callId: 'tool-1',
|
|
125
|
+
name: 'Execute Command',
|
|
126
|
+
description: 'Run bash command',
|
|
127
|
+
renderOutputAsMarkdown: false,
|
|
128
|
+
status: ToolCallStatus.Success,
|
|
129
|
+
resultDisplay: 'total 4\ndrwxr-xr-x 2 user user 4096 Jan 1 00:00 .',
|
|
130
|
+
confirmationDetails: undefined,
|
|
131
|
+
});
|
|
132
|
+
expect(result.uiHistory[1].tools[1]).toEqual({
|
|
133
|
+
callId: 'tool-2',
|
|
134
|
+
name: 'Read File',
|
|
135
|
+
description: 'Read file contents',
|
|
136
|
+
renderOutputAsMarkdown: true, // default value
|
|
137
|
+
status: ToolCallStatus.Error,
|
|
138
|
+
resultDisplay: 'Permission denied',
|
|
139
|
+
confirmationDetails: undefined,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
it('should skip empty tool calls arrays', () => {
|
|
144
|
+
const messages = [
|
|
145
|
+
{
|
|
146
|
+
id: 'msg-1',
|
|
147
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
148
|
+
content: 'Message with empty tools',
|
|
149
|
+
type: 'gemini',
|
|
150
|
+
toolCalls: [],
|
|
151
|
+
},
|
|
152
|
+
];
|
|
153
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
154
|
+
expect(result.uiHistory).toHaveLength(1); // Only text message
|
|
155
|
+
expect(result.uiHistory[0]).toEqual({
|
|
156
|
+
type: MessageType.GEMINI,
|
|
157
|
+
text: 'Message with empty tools',
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
it('should not add tool calls for user messages', () => {
|
|
161
|
+
const messages = [
|
|
162
|
+
{
|
|
163
|
+
id: 'msg-1',
|
|
164
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
165
|
+
content: 'User message',
|
|
166
|
+
type: 'user',
|
|
167
|
+
// This would be invalid in real usage, but testing robustness
|
|
168
|
+
toolCalls: [
|
|
169
|
+
{
|
|
170
|
+
id: 'tool-1',
|
|
171
|
+
name: 'invalid',
|
|
172
|
+
args: {},
|
|
173
|
+
status: 'success',
|
|
174
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
];
|
|
179
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
180
|
+
expect(result.uiHistory).toHaveLength(1); // Only user message, no tool group
|
|
181
|
+
expect(result.uiHistory[0]).toEqual({
|
|
182
|
+
type: MessageType.USER,
|
|
183
|
+
text: 'User message',
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
it('should handle missing tool call fields gracefully', () => {
|
|
187
|
+
const messages = [
|
|
188
|
+
{
|
|
189
|
+
id: 'msg-1',
|
|
190
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
191
|
+
content: 'Message with minimal tool',
|
|
192
|
+
type: 'gemini',
|
|
193
|
+
toolCalls: [
|
|
194
|
+
{
|
|
195
|
+
id: 'tool-1',
|
|
196
|
+
name: 'minimal_tool',
|
|
197
|
+
args: {},
|
|
198
|
+
status: 'success',
|
|
199
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
200
|
+
// Missing optional fields
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
},
|
|
204
|
+
];
|
|
205
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
206
|
+
expect(result.uiHistory).toHaveLength(2);
|
|
207
|
+
expect(result.uiHistory[1].type).toBe('tool_group');
|
|
208
|
+
if (result.uiHistory[1].type === 'tool_group') {
|
|
209
|
+
expect(result.uiHistory[1].tools[0]).toEqual({
|
|
210
|
+
callId: 'tool-1',
|
|
211
|
+
name: 'minimal_tool', // Falls back to name when displayName missing
|
|
212
|
+
description: '', // Default empty string
|
|
213
|
+
renderOutputAsMarkdown: true, // Default value
|
|
214
|
+
status: ToolCallStatus.Success,
|
|
215
|
+
resultDisplay: undefined,
|
|
216
|
+
confirmationDetails: undefined,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
throw new Error('unreachable');
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
describe('tool calls in client history', () => {
|
|
224
|
+
it('should convert tool calls to correct Gemini client history format', () => {
|
|
225
|
+
const messages = [
|
|
226
|
+
{
|
|
227
|
+
id: 'msg-1',
|
|
228
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
229
|
+
content: 'List files',
|
|
230
|
+
type: 'user',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
id: 'msg-2',
|
|
234
|
+
timestamp: '2025-01-01T00:02:00Z',
|
|
235
|
+
content: "I'll list the files for you.",
|
|
236
|
+
type: 'gemini',
|
|
237
|
+
toolCalls: [
|
|
238
|
+
{
|
|
239
|
+
id: 'tool-1',
|
|
240
|
+
name: 'list_directory',
|
|
241
|
+
args: { path: '/home/user' },
|
|
242
|
+
result: {
|
|
243
|
+
functionResponse: {
|
|
244
|
+
id: 'list_directory-1753650620141-f3b8b9e73919d',
|
|
245
|
+
name: 'list_directory',
|
|
246
|
+
response: {
|
|
247
|
+
output: 'file1.txt\nfile2.txt',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
status: 'success',
|
|
252
|
+
timestamp: '2025-01-01T00:02:30Z',
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
];
|
|
257
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
258
|
+
// Should have: user message, model with function call, user with function response
|
|
259
|
+
expect(result.clientHistory).toHaveLength(3);
|
|
260
|
+
// User message
|
|
261
|
+
expect(result.clientHistory[0]).toEqual({
|
|
262
|
+
role: 'user',
|
|
263
|
+
parts: [{ text: 'List files' }],
|
|
264
|
+
});
|
|
265
|
+
// Model message with function call
|
|
266
|
+
expect(result.clientHistory[1]).toEqual({
|
|
267
|
+
role: 'model',
|
|
268
|
+
parts: [
|
|
269
|
+
{ text: "I'll list the files for you." },
|
|
270
|
+
{
|
|
271
|
+
functionCall: {
|
|
272
|
+
name: 'list_directory',
|
|
273
|
+
args: { path: '/home/user' },
|
|
274
|
+
id: 'tool-1',
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
});
|
|
279
|
+
// Function response
|
|
280
|
+
expect(result.clientHistory[2]).toEqual({
|
|
281
|
+
role: 'user',
|
|
282
|
+
parts: [
|
|
283
|
+
{
|
|
284
|
+
functionResponse: {
|
|
285
|
+
id: 'list_directory-1753650620141-f3b8b9e73919d',
|
|
286
|
+
name: 'list_directory',
|
|
287
|
+
response: { output: 'file1.txt\nfile2.txt' },
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
],
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
it('should handle tool calls without text content', () => {
|
|
294
|
+
const messages = [
|
|
295
|
+
{
|
|
296
|
+
id: 'msg-1',
|
|
297
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
298
|
+
content: '',
|
|
299
|
+
type: 'gemini',
|
|
300
|
+
toolCalls: [
|
|
301
|
+
{
|
|
302
|
+
id: 'tool-1',
|
|
303
|
+
name: 'bash',
|
|
304
|
+
args: { command: 'ls' },
|
|
305
|
+
result: 'file1.txt\nfile2.txt',
|
|
306
|
+
status: 'success',
|
|
307
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
},
|
|
311
|
+
];
|
|
312
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
313
|
+
expect(result.clientHistory).toHaveLength(2);
|
|
314
|
+
// Model message with only function call (no text)
|
|
315
|
+
expect(result.clientHistory[0]).toEqual({
|
|
316
|
+
role: 'model',
|
|
317
|
+
parts: [
|
|
318
|
+
{
|
|
319
|
+
functionCall: {
|
|
320
|
+
name: 'bash',
|
|
321
|
+
args: { command: 'ls' },
|
|
322
|
+
id: 'tool-1',
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
});
|
|
327
|
+
// Function response
|
|
328
|
+
expect(result.clientHistory[1]).toEqual({
|
|
329
|
+
role: 'user',
|
|
330
|
+
parts: [
|
|
331
|
+
{
|
|
332
|
+
functionResponse: {
|
|
333
|
+
id: 'tool-1',
|
|
334
|
+
name: 'bash',
|
|
335
|
+
response: {
|
|
336
|
+
output: 'file1.txt\nfile2.txt',
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
it('should handle multiple tool calls in one message', () => {
|
|
344
|
+
const messages = [
|
|
345
|
+
{
|
|
346
|
+
id: 'msg-1',
|
|
347
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
348
|
+
content: 'Running multiple commands',
|
|
349
|
+
type: 'gemini',
|
|
350
|
+
toolCalls: [
|
|
351
|
+
{
|
|
352
|
+
id: 'tool-1',
|
|
353
|
+
name: 'bash',
|
|
354
|
+
args: { command: 'pwd' },
|
|
355
|
+
result: '/home/user',
|
|
356
|
+
status: 'success',
|
|
357
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id: 'tool-2',
|
|
361
|
+
name: 'bash',
|
|
362
|
+
args: { command: 'ls' },
|
|
363
|
+
result: [
|
|
364
|
+
{
|
|
365
|
+
functionResponse: {
|
|
366
|
+
id: 'tool-2',
|
|
367
|
+
name: 'bash',
|
|
368
|
+
response: {
|
|
369
|
+
output: 'file1.txt',
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
functionResponse: {
|
|
375
|
+
id: 'tool-2',
|
|
376
|
+
name: 'bash',
|
|
377
|
+
response: {
|
|
378
|
+
output: 'file2.txt',
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
],
|
|
383
|
+
status: 'success',
|
|
384
|
+
timestamp: '2025-01-01T00:01:35Z',
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
];
|
|
389
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
390
|
+
// Should have: model with both function calls, then one response
|
|
391
|
+
expect(result.clientHistory).toHaveLength(2);
|
|
392
|
+
// Model message with both function calls
|
|
393
|
+
expect(result.clientHistory[0]).toEqual({
|
|
394
|
+
role: 'model',
|
|
395
|
+
parts: [
|
|
396
|
+
{ text: 'Running multiple commands' },
|
|
397
|
+
{
|
|
398
|
+
functionCall: {
|
|
399
|
+
name: 'bash',
|
|
400
|
+
args: { command: 'pwd' },
|
|
401
|
+
id: 'tool-1',
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
functionCall: {
|
|
406
|
+
name: 'bash',
|
|
407
|
+
args: { command: 'ls' },
|
|
408
|
+
id: 'tool-2',
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
});
|
|
413
|
+
// First function response
|
|
414
|
+
expect(result.clientHistory[1]).toEqual({
|
|
415
|
+
role: 'user',
|
|
416
|
+
parts: [
|
|
417
|
+
{
|
|
418
|
+
functionResponse: {
|
|
419
|
+
id: 'tool-1',
|
|
420
|
+
name: 'bash',
|
|
421
|
+
response: { output: '/home/user' },
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
functionResponse: {
|
|
426
|
+
id: 'tool-2',
|
|
427
|
+
name: 'bash',
|
|
428
|
+
response: { output: 'file1.txt' },
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
functionResponse: {
|
|
433
|
+
id: 'tool-2',
|
|
434
|
+
name: 'bash',
|
|
435
|
+
response: { output: 'file2.txt' },
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
it('should handle Part array results from tools', () => {
|
|
442
|
+
const messages = [
|
|
443
|
+
{
|
|
444
|
+
id: 'msg-1',
|
|
445
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
446
|
+
content: 'Reading file',
|
|
447
|
+
type: 'gemini',
|
|
448
|
+
toolCalls: [
|
|
449
|
+
{
|
|
450
|
+
id: 'tool-1',
|
|
451
|
+
name: 'read_file',
|
|
452
|
+
args: { path: 'test.txt' },
|
|
453
|
+
result: [
|
|
454
|
+
{
|
|
455
|
+
functionResponse: {
|
|
456
|
+
id: 'tool-1',
|
|
457
|
+
name: 'read_file',
|
|
458
|
+
response: {
|
|
459
|
+
output: 'Hello',
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
functionResponse: {
|
|
465
|
+
id: 'tool-1',
|
|
466
|
+
name: 'read_file',
|
|
467
|
+
response: {
|
|
468
|
+
output: ' World',
|
|
469
|
+
},
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
],
|
|
473
|
+
status: 'success',
|
|
474
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
},
|
|
478
|
+
];
|
|
479
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
480
|
+
expect(result.clientHistory).toHaveLength(2);
|
|
481
|
+
// Function response should extract both function responses
|
|
482
|
+
expect(result.clientHistory[1]).toEqual({
|
|
483
|
+
role: 'user',
|
|
484
|
+
parts: [
|
|
485
|
+
{
|
|
486
|
+
functionResponse: {
|
|
487
|
+
id: 'tool-1',
|
|
488
|
+
name: 'read_file',
|
|
489
|
+
response: {
|
|
490
|
+
output: 'Hello',
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
functionResponse: {
|
|
496
|
+
id: 'tool-1',
|
|
497
|
+
name: 'read_file',
|
|
498
|
+
response: {
|
|
499
|
+
output: ' World',
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
],
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
it('should skip tool calls without results', () => {
|
|
507
|
+
const messages = [
|
|
508
|
+
{
|
|
509
|
+
id: 'msg-1',
|
|
510
|
+
timestamp: '2025-01-01T00:01:00Z',
|
|
511
|
+
content: 'Testing tool',
|
|
512
|
+
type: 'gemini',
|
|
513
|
+
toolCalls: [
|
|
514
|
+
{
|
|
515
|
+
id: 'tool-1',
|
|
516
|
+
name: 'test_tool',
|
|
517
|
+
args: { arg: 'value' },
|
|
518
|
+
// No result field
|
|
519
|
+
status: 'error',
|
|
520
|
+
timestamp: '2025-01-01T00:01:30Z',
|
|
521
|
+
},
|
|
522
|
+
],
|
|
523
|
+
},
|
|
524
|
+
];
|
|
525
|
+
const result = convertSessionToHistoryFormats(messages);
|
|
526
|
+
// Should only have the model message with function call, no function response
|
|
527
|
+
expect(result.clientHistory).toHaveLength(1);
|
|
528
|
+
expect(result.clientHistory[0]).toEqual({
|
|
529
|
+
role: 'model',
|
|
530
|
+
parts: [
|
|
531
|
+
{ text: 'Testing tool' },
|
|
532
|
+
{
|
|
533
|
+
functionCall: {
|
|
534
|
+
name: 'test_tool',
|
|
535
|
+
args: { arg: 'value' },
|
|
536
|
+
id: 'tool-1',
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
],
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
});
|
|
543
|
+
});
|
|
544
|
+
//# sourceMappingURL=useSessionBrowser.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionBrowser.test.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useSessionBrowser.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AACxE,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SAAS,EAAE;wBACT;4BACE,EAAE,EAAE,QAAQ;4BACZ,IAAI,EAAE,WAAW;4BACjB,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE;4BACtB,kBAAkB;4BAClB,MAAM,EAAE,OAAO;4BACf,SAAS,EAAE,sBAAsB;yBAClC;qBACF;iBACF;aACF,CAAC;YAEF,MAAM,MAAM,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC;YAExD,8EAA8E;YAC9E,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAE7C,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,EAAE,IAAI,EAAE,cAAc,EAAE;oBACxB;wBACE,YAAY,EAAE;4BACZ,IAAI,EAAE,WAAW;4BACjB,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE;4BACtB,EAAE,EAAE,QAAQ;yBACb;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { Config, ResumedSessionData } from '@google/gemini-cli-core';
|
|
7
|
+
import type { Part } from '@google/genai';
|
|
8
|
+
import type { HistoryItemWithoutId } from '../types.js';
|
|
9
|
+
import type { UseHistoryManagerReturn } from './useHistoryManager.js';
|
|
10
|
+
interface UseSessionResumeParams {
|
|
11
|
+
config: Config;
|
|
12
|
+
historyManager: UseHistoryManagerReturn;
|
|
13
|
+
refreshStatic: () => void;
|
|
14
|
+
isGeminiClientInitialized: boolean;
|
|
15
|
+
setQuittingMessages: (messages: null) => void;
|
|
16
|
+
resumedSessionData?: ResumedSessionData;
|
|
17
|
+
isAuthenticating: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Hook to handle session resumption logic.
|
|
21
|
+
* Provides a callback to load history for resume and automatically
|
|
22
|
+
* handles command-line resume on mount.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useSessionResume({ config, historyManager, refreshStatic, isGeminiClientInitialized, setQuittingMessages, resumedSessionData, isAuthenticating, }: UseSessionResumeParams): {
|
|
25
|
+
loadHistoryForResume: (uiHistory: HistoryItemWithoutId[], clientHistory: Array<{
|
|
26
|
+
role: "user" | "model";
|
|
27
|
+
parts: Part[];
|
|
28
|
+
}>, resumedData: ResumedSessionData) => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
7
|
+
import { convertSessionToHistoryFormats } from './useSessionBrowser.js';
|
|
8
|
+
/**
|
|
9
|
+
* Hook to handle session resumption logic.
|
|
10
|
+
* Provides a callback to load history for resume and automatically
|
|
11
|
+
* handles command-line resume on mount.
|
|
12
|
+
*/
|
|
13
|
+
export function useSessionResume({ config, historyManager, refreshStatic, isGeminiClientInitialized, setQuittingMessages, resumedSessionData, isAuthenticating, }) {
|
|
14
|
+
// Use refs to avoid dependency chain that causes infinite loop
|
|
15
|
+
const historyManagerRef = useRef(historyManager);
|
|
16
|
+
const refreshStaticRef = useRef(refreshStatic);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
historyManagerRef.current = historyManager;
|
|
19
|
+
refreshStaticRef.current = refreshStatic;
|
|
20
|
+
});
|
|
21
|
+
const loadHistoryForResume = useCallback((uiHistory, clientHistory, resumedData) => {
|
|
22
|
+
// Wait for the client.
|
|
23
|
+
if (!isGeminiClientInitialized) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
// Now that we have the client, load the history into the UI and the client.
|
|
27
|
+
setQuittingMessages(null);
|
|
28
|
+
historyManagerRef.current.clearItems();
|
|
29
|
+
uiHistory.forEach((item, index) => {
|
|
30
|
+
historyManagerRef.current.addItem(item, index);
|
|
31
|
+
});
|
|
32
|
+
refreshStaticRef.current(); // Force Static component to re-render with the updated history.
|
|
33
|
+
// Give the history to the Gemini client.
|
|
34
|
+
config.getGeminiClient()?.resumeChat(clientHistory, resumedData);
|
|
35
|
+
}, [config, isGeminiClientInitialized, setQuittingMessages]);
|
|
36
|
+
// Handle interactive resume from the command line (-r/--resume without -p/--prompt-interactive).
|
|
37
|
+
// Only if we're not authenticating and the client is initialized, though.
|
|
38
|
+
const hasLoadedResumedSession = useRef(false);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (resumedSessionData &&
|
|
41
|
+
!isAuthenticating &&
|
|
42
|
+
isGeminiClientInitialized &&
|
|
43
|
+
!hasLoadedResumedSession.current) {
|
|
44
|
+
hasLoadedResumedSession.current = true;
|
|
45
|
+
const historyData = convertSessionToHistoryFormats(resumedSessionData.conversation.messages);
|
|
46
|
+
loadHistoryForResume(historyData.uiHistory, historyData.clientHistory, resumedSessionData);
|
|
47
|
+
}
|
|
48
|
+
}, [
|
|
49
|
+
resumedSessionData,
|
|
50
|
+
isAuthenticating,
|
|
51
|
+
isGeminiClientInitialized,
|
|
52
|
+
loadHistoryForResume,
|
|
53
|
+
]);
|
|
54
|
+
return { loadHistoryForResume };
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=useSessionResume.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionResume.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useSessionResume.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,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