summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.test.ts2
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts8
-rw-r--r--packages/cli/src/ui/hooks/useGeminiStream.test.tsx2
-rw-r--r--packages/cli/src/ui/hooks/useGeminiStream.ts6
4 files changed, 9 insertions, 9 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
index 04931c7f..03f8cc9c 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
@@ -135,7 +135,7 @@ describe('useSlashCommandProcessor', () => {
getSandbox: vi.fn(() => 'test-sandbox'),
getModel: vi.fn(() => 'test-model'),
getProjectRoot: vi.fn(() => '/test/dir'),
- getCheckpointEnabled: vi.fn(() => true),
+ getCheckpointingEnabled: vi.fn(() => true),
getBugCommand: vi.fn(() => undefined),
} as unknown as Config;
mockCorgiMode = vi.fn();
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index ee7b55cb..8195f005 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -647,7 +647,7 @@ Add any other context about the problem here.
description:
'resume from conversation checkpoint. Usage: /resume [tag]',
completion: async () => {
- const geminiDir = config?.getGeminiDir();
+ const geminiDir = config?.getProjectTempDir();
if (!geminiDir) {
return [];
}
@@ -805,14 +805,14 @@ Add any other context about the problem here.
},
];
- if (config?.getCheckpointEnabled()) {
+ if (config?.getCheckpointingEnabled()) {
commands.push({
name: 'restore',
description:
'restore a tool call. This will reset the conversation and file history to the state it was in when the tool call was suggested',
action: async (_mainCommand, subCommand, _args) => {
- const checkpointDir = config?.getGeminiDir()
- ? path.join(config.getGeminiDir(), 'checkpoints')
+ const checkpointDir = config?.getProjectTempDir()
+ ? path.join(config.getProjectTempDir(), 'checkpoints')
: undefined;
if (!checkpointDir) {
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx
index 6fcdcf34..487738c3 100644
--- a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx
+++ b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx
@@ -280,7 +280,7 @@ describe('useGeminiStream', () => {
() => ({ getToolSchemaList: vi.fn(() => []) }) as any,
),
getProjectRoot: vi.fn(() => '/test/dir'),
- getCheckpointEnabled: vi.fn(() => false),
+ getCheckpointingEnabled: vi.fn(() => false),
getGeminiClient: mockGetGeminiClient,
addHistory: vi.fn(),
} as unknown as Config;
diff --git a/packages/cli/src/ui/hooks/useGeminiStream.ts b/packages/cli/src/ui/hooks/useGeminiStream.ts
index 86c35836..234652db 100644
--- a/packages/cli/src/ui/hooks/useGeminiStream.ts
+++ b/packages/cli/src/ui/hooks/useGeminiStream.ts
@@ -638,7 +638,7 @@ export const useGeminiStream = (
useEffect(() => {
const saveRestorableToolCalls = async () => {
- if (!config.getCheckpointEnabled()) {
+ if (!config.getCheckpointingEnabled()) {
return;
}
const restorableToolCalls = toolCalls.filter(
@@ -649,8 +649,8 @@ export const useGeminiStream = (
);
if (restorableToolCalls.length > 0) {
- const checkpointDir = config.getGeminiDir()
- ? path.join(config.getGeminiDir(), 'checkpoints')
+ const checkpointDir = config.getProjectTempDir()
+ ? path.join(config.getProjectTempDir(), 'checkpoints')
: undefined;
if (!checkpointDir) {