Make checkpoints configurable in settings.json (#1251)

This commit is contained in:
Louis Jimenez
2025-06-20 00:39:15 -04:00
committed by GitHub
parent ea63a8401e
commit 6c67618624
11 changed files with 50 additions and 21 deletions

View File

@@ -186,4 +186,22 @@ describe('Configuration Integration Tests', () => {
expect(config.getFileFilteringRespectGitIgnore()).toBe(false);
});
});
describe('Checkpointing Configuration', () => {
it('should enable checkpointing when the setting is true', async () => {
const configParams: ConfigParameters = {
cwd: '/tmp',
contentGeneratorConfig: TEST_CONTENT_GENERATOR_CONFIG,
embeddingModel: 'test-embedding-model',
sandbox: false,
targetDir: tempDir,
debugMode: false,
checkpointing: true,
};
const config = new Config(configParams);
expect(config.getCheckpointingEnabled()).toBe(true);
});
});
});

View File

@@ -49,7 +49,7 @@ interface CliArgs {
show_memory_usage: boolean | undefined;
yolo: boolean | undefined;
telemetry: boolean | undefined;
checkpoint: boolean | undefined;
checkpointing: boolean | undefined;
telemetryTarget: string | undefined;
telemetryOtlpEndpoint: string | undefined;
telemetryLogPrompts: boolean | undefined;
@@ -122,7 +122,7 @@ async function parseArguments(): Promise<CliArgs> {
description:
'Enable or disable logging of user prompts for telemetry. Overrides settings files.',
})
.option('checkpoint', {
.option('checkpointing', {
alias: 'c',
type: 'boolean',
description: 'Enables checkpointing of file edits',
@@ -229,7 +229,7 @@ export async function loadCliConfig(
},
// Git-aware file filtering settings
fileFilteringRespectGitIgnore: settings.fileFiltering?.respectGitIgnore,
checkpoint: argv.checkpoint,
checkpointing: argv.checkpointing || settings.checkpointing?.enabled,
proxy:
process.env.HTTPS_PROXY ||
process.env.https_proxy ||

View File

@@ -27,6 +27,10 @@ export enum SettingScope {
Workspace = 'Workspace',
}
export interface CheckpointingSettings {
enabled?: boolean;
}
export interface AccessibilitySettings {
disableLoadingPhrases?: boolean;
}
@@ -47,6 +51,7 @@ export interface Settings {
telemetry?: TelemetrySettings;
preferredEditor?: string;
bugCommand?: BugCommandSettings;
checkpointing?: CheckpointingSettings;
// Git-aware file filtering settings
fileFiltering?: {