mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 01:51:20 -07:00
feat(cli): Move key restore logic to core (#13013)
This commit is contained in:
@@ -16,6 +16,7 @@ import type {
|
||||
ThoughtSummary,
|
||||
ToolCallRequestInfo,
|
||||
GeminiErrorEventValue,
|
||||
ToolCallData,
|
||||
} from '@google/gemini-cli-core';
|
||||
import {
|
||||
GeminiEventType as ServerGeminiEventType,
|
||||
@@ -1313,22 +1314,23 @@ export const useGeminiStream = (
|
||||
toolCallWithSnapshotFileName,
|
||||
);
|
||||
|
||||
const checkpointData: ToolCallData<
|
||||
HistoryItem[],
|
||||
Record<string, unknown>
|
||||
> & { filePath: string } = {
|
||||
history,
|
||||
clientHistory,
|
||||
toolCall: {
|
||||
name: toolCall.request.name,
|
||||
args: toolCall.request.args,
|
||||
},
|
||||
commitHash,
|
||||
filePath,
|
||||
};
|
||||
|
||||
await fs.writeFile(
|
||||
toolCallWithSnapshotFilePath,
|
||||
JSON.stringify(
|
||||
{
|
||||
history,
|
||||
clientHistory,
|
||||
toolCall: {
|
||||
name: toolCall.request.name,
|
||||
args: toolCall.request.args,
|
||||
},
|
||||
commitHash,
|
||||
filePath,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
JSON.stringify(checkpointData, null, 2),
|
||||
);
|
||||
} catch (error) {
|
||||
onDebugMessage(
|
||||
|
||||
Reference in New Issue
Block a user