Skip to content

Commit 1f46b12

Browse files
committed
Remove default values from configuration settings and update checkpoint lifespan default to 24 hours
1 parent 7240a47 commit 1f46b12

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

‎packages/vscode/package.json‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,14 +632,11 @@
632632
"default": 5
633633
},
634634
"codeWebChat.contextSizeWarningThreshold": {
635-
"type": "number",
636-
"default": 60000
635+
"type": "number"
637636
},
638637
"codeWebChat.checkpointLifespan": {
639638
"type": "number",
640-
"scope": "resource",
641-
"default": 48,
642-
"minimum": 1
639+
"scope": "resource"
643640
},
644641
"codeWebChat.areAutomaticCheckpointsDisabled": {
645642
"type": "boolean",

‎packages/vscode/src/commands/checkpoints-command/actions/get-checkpoints.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const remove_old_checkpoints = async (
1010
): Promise<Checkpoint[]> => {
1111
const config = vscode.workspace.getConfiguration('codeWebChat')
1212
const checkpoint_lifespan_hours =
13-
config.get<number>('checkpointLifespan') || 48
13+
config.get<number>('checkpointLifespan') || 24
1414
const checkpoint_lifespan_ms = checkpoint_lifespan_hours * 60 * 60 * 1000
1515

1616
const now = Date.now()

‎packages/vscode/src/views/settings/backend/message-handlers/handle-get-checkpoint-lifespan.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export const handle_get_checkpoint_lifespan = async (
55
provider: SettingsProvider
66
): Promise<void> => {
77
const config = vscode.workspace.getConfiguration('codeWebChat')
8-
const hours = config.get<number>('checkpointLifespan', 48)
8+
const hours = config.get<number>('checkpointLifespan', 24)
99
provider.postMessage({ command: 'CHECKPOINT_LIFESPAN', hours })
1010
}

‎packages/vscode/src/views/settings/backend/message-handlers/handle-get-context-size-warning-threshold.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ export const handle_get_context_size_warning_threshold = async (
55
provider: SettingsProvider
66
): Promise<void> => {
77
const config = vscode.workspace.getConfiguration('codeWebChat')
8-
const threshold = config.get<number>('contextSizeWarningThreshold')
9-
if (threshold === undefined) {
10-
// Should not happen if default is set in package.json
11-
return
12-
}
8+
const threshold = config.get<number>('contextSizeWarningThreshold', 60000)
139
provider.postMessage({
1410
command: 'CONTEXT_SIZE_WARNING_THRESHOLD',
1511
threshold

0 commit comments

Comments
 (0)