Skip to content

Commit b01cb0a

Browse files
committed
Remove checkpoint lifespan and automatic checkpoint settings
- remove 'are automatic checkpoints disabled' setting, as should be enabled at all times - remove 'checkpoint lifespan' setting, as should be 24h at all times ├── README.md └── apps └── editor ├── package.json └── src ├── constants │ ├── instructions.ts │ └── values.ts ├── features │ └── checkpoints │ └── actions │ └── get-checkpoints.ts └── views └── settings ├── backend │ ├── message-handlers │ │ └── index.ts │ └── settings-view-provider.ts ├── frontend │ ├── Home │ │ ├── Home.tsx │ │ └── sections │ │ └── GeneralSection.tsx │ ├── Settings.tsx │ ├── hooks │ │ └── use-settings.ts │ └── i18n │ └── translations │ └── general.ts └── types └── messages.ts
1 parent 61d34d1 commit b01cb0a

16 files changed

Lines changed: 2 additions & 350 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -979,15 +979,6 @@
979979
"type": "boolean",
980980
"scope": "resource"
981981
},
982-
"codeWebChat.checkpointLifespan": {
983-
"type": "number",
984-
"scope": "resource"
985-
},
986-
"codeWebChat.areAutomaticCheckpointsDisabled": {
987-
"type": "boolean",
988-
"scope": "resource",
989-
"default": false
990-
},
991982
"codeWebChat.sendWithShiftEnter": {
992983
"type": "boolean",
993984
"scope": "resource",

‎apps/editor/src/features/checkpoints/actions/create-checkpoint.ts‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@ export const create_checkpoint = async (params: {
3232
}): Promise<Checkpoint | undefined> => {
3333
try {
3434
const trigger = params.trigger ?? 'manual'
35-
const are_automatic_checkpoints_disabled = vscode.workspace
36-
.getConfiguration('codeWebChat')
37-
.get<boolean>('areAutomaticCheckpointsDisabled', false)
38-
const is_automatic_checkpoint = trigger != 'manual'
39-
40-
if (are_automatic_checkpoints_disabled && is_automatic_checkpoint) {
41-
Logger.info({
42-
function_name: 'create_checkpoint',
43-
message: 'Automatic checkpoint creation is disabled. Skipping.',
44-
data: { trigger }
45-
})
46-
return undefined
47-
}
4835

4936
const operation_in_progress =
5037
params.extension_context.workspaceState.get<number>(

‎apps/editor/src/features/checkpoints/actions/get-checkpoints.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ import { CHECKPOINT_DEFAULT_LIFESPAN } from '@/constants/values'
88
export const remove_old_checkpoints = async (
99
checkpoints: Checkpoint[]
1010
): Promise<Checkpoint[]> => {
11-
const config = vscode.workspace.getConfiguration('codeWebChat')
12-
const checkpoint_lifespan_hours =
13-
config.get<number>('checkpointLifespan') || CHECKPOINT_DEFAULT_LIFESPAN
14-
const checkpoint_lifespan_ms = checkpoint_lifespan_hours * 60 * 60 * 1000
11+
const checkpoint_lifespan_ms = CHECKPOINT_DEFAULT_LIFESPAN * 60 * 60 * 1000
1512

1613
const now = Date.now()
1714
const cutoff_time = now - checkpoint_lifespan_ms

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-are-automatic-checkpoints-disabled.ts‎

Lines changed: 0 additions & 15 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-checkpoint-lifespan.ts‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-are-automatic-checkpoints-disabled.ts‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-checkpoint-lifespan.ts‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎apps/editor/src/views/settings/backend/message-handlers/index.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ export * from './handle-get-gemini-user-id'
2929
export * from './handle-update-gemini-user-id'
3030
export * from './handle-get-ai-studio-user-id'
3131
export * from './handle-update-ai-studio-user-id'
32-
export * from './handle-get-are-automatic-checkpoints-disabled'
33-
export * from './handle-update-are-automatic-checkpoints-disabled'
34-
export * from './handle-get-checkpoint-lifespan'
35-
export * from './handle-update-checkpoint-lifespan'
3632
export * from './handle-open-ignore-patterns-settings'
3733
export * from './handle-open-allow-patterns-settings'
3834
export * from './handle-get-send-with-shift-enter'

‎apps/editor/src/views/settings/backend/settings-view-provider.ts‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
handle_update_model_provider,
99
handle_delete_model_provider,
1010
handle_get_clear_checks_in_workspace_behavior,
11-
handle_get_are_automatic_checkpoints_disabled,
1211
handle_get_api_configurations,
1312
handle_get_commit_message_instructions,
1413
handle_get_attach_ascii_tree_of_context,
@@ -20,13 +19,10 @@ import {
2019
handle_get_model_providers,
2120
handle_get_send_with_shift_enter,
2221
handle_get_reuse_last_tab,
23-
handle_update_checkpoint_lifespan,
24-
handle_get_checkpoint_lifespan,
2522
handle_reorder_model_providers,
2623
handle_set_default_api_configuration,
2724
handle_select_default_api_configuration,
2825
handle_update_clear_checks_in_workspace_behavior,
29-
handle_update_are_automatic_checkpoints_disabled,
3026
handle_update_commit_message_instructions,
3127
handle_update_attach_ascii_tree_of_context,
3228
handle_update_use_context_files_in_commit_message_prompt,
@@ -242,8 +238,6 @@ export class SettingsViewProvider {
242238
await handle_get_ai_studio_user_id(this)
243239
} else if (message.command == 'UPDATE_AI_STUDIO_USER_ID') {
244240
await handle_update_ai_studio_user_id(message)
245-
} else if (message.command == 'GET_CHECKPOINT_LIFESPAN') {
246-
await handle_get_checkpoint_lifespan(this)
247241
} else if (message.command == 'GET_SEND_WITH_SHIFT_ENTER') {
248242
await handle_get_send_with_shift_enter(this)
249243
} else if (message.command == 'UPDATE_SEND_WITH_SHIFT_ENTER') {
@@ -252,16 +246,6 @@ export class SettingsViewProvider {
252246
await handle_get_reuse_last_tab(this)
253247
} else if (message.command == 'UPDATE_REUSE_LAST_TAB') {
254248
await handle_update_reuse_last_tab(message)
255-
} else if (
256-
message.command == 'GET_ARE_AUTOMATIC_CHECKPOINTS_DISABLED'
257-
) {
258-
await handle_get_are_automatic_checkpoints_disabled(this)
259-
} else if (
260-
message.command == 'UPDATE_ARE_AUTOMATIC_CHECKPOINTS_DISABLED'
261-
) {
262-
await handle_update_are_automatic_checkpoints_disabled(message)
263-
} else if (message.command == 'UPDATE_CHECKPOINT_LIFESPAN') {
264-
await handle_update_checkpoint_lifespan(message)
265249
} else if (message.command == 'OPEN_EDITOR_SETTINGS') {
266250
await vscode.commands.executeCommand('workbench.action.openSettings')
267251
} else if (message.command == 'OPEN_IGNORE_PATTERNS_SETTINGS') {
@@ -327,8 +311,6 @@ export class SettingsViewProvider {
327311
void handle_get_use_context_files_in_commit_message_prompt(this)
328312
void handle_get_include_prompts_in_commit_messages(this)
329313
void handle_get_clear_checks_in_workspace_behavior(this)
330-
void handle_get_are_automatic_checkpoints_disabled(this)
331-
void handle_get_checkpoint_lifespan(this)
332314
void handle_get_gemini_user_id(this)
333315
void handle_get_ai_studio_user_id(this)
334316
void handle_get_send_with_shift_enter(this)

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export type NavItem =
2525
| 'section:general:group:open-links'
2626
| 'section:general:group:context'
2727
| 'section:general:group:prompt-field'
28-
| 'section:general:group:history'
2928
| 'section:general:group:commit-messages'
3029
| 'section:web'
3130
| 'section:web:group:web-configurations'
@@ -56,10 +55,6 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
5655
id: 'section:general:group:prompt-field',
5756
label: 'general.prompt-field.title'
5857
},
59-
{
60-
id: 'section:general:group:history',
61-
label: 'general.history.title'
62-
},
6358
{
6459
id: 'section:general:group:commit-messages',
6560
label: 'general.commit-messages.title'
@@ -118,8 +113,6 @@ type Props = {
118113
ai_studio_user_id: number | null
119114
send_with_shift_enter: boolean
120115
reuse_last_tab: boolean
121-
are_automatic_checkpoints_disabled: boolean
122-
checkpoint_lifespan: number
123116
clear_checks_in_workspace_behavior: 'ignore-open-editors' | 'uncheck-all'
124117
auto_run_patch_repair: boolean
125118
templates: Record<string, Template[]>
@@ -146,8 +139,6 @@ type Props = {
146139
on_edit_files_system_instructions_change: (instructions: string) => void
147140
on_intelligent_search_instructions_change: (instructions: string) => void
148141
on_agentic_search_instructions_change: (instructions: string) => void
149-
on_automatic_checkpoints_toggle: (disabled: boolean) => void
150-
on_checkpoint_lifespan_change: (hours: number | undefined) => void
151142
on_gemini_user_id_change: (id: number | null) => void
152143
on_ai_studio_user_id_change: (id: number | null) => void
153144
on_send_with_shift_enter_change: (enabled: boolean) => void
@@ -201,7 +192,6 @@ export const Home: React.FC<Props> = (props) => {
201192
'section:general:group:open-links': null,
202193
'section:general:group:context': null,
203194
'section:general:group:prompt-field': null,
204-
'section:general:group:history': null,
205195
'section:general:group:commit-messages': null,
206196
'section:web': null,
207197
'section:web:group:web-configurations': null,
@@ -544,14 +534,6 @@ export const Home: React.FC<Props> = (props) => {
544534
on_clear_checks_in_workspace_behavior_change={
545535
props.on_clear_checks_in_workspace_behavior_change
546536
}
547-
are_automatic_checkpoints_disabled={
548-
props.are_automatic_checkpoints_disabled
549-
}
550-
on_automatic_checkpoints_toggle={
551-
props.on_automatic_checkpoints_toggle
552-
}
553-
checkpoint_lifespan={props.checkpoint_lifespan}
554-
on_checkpoint_lifespan_change={props.on_checkpoint_lifespan_change}
555537
on_open_editor_settings={props.on_open_editor_settings}
556538
on_open_ignore_patterns_settings={
557539
props.on_open_ignore_patterns_settings

0 commit comments

Comments
 (0)