Skip to content

Commit eb0fb7e

Browse files
committed
Remove checkNewFiles setting and always automatically include newly created files in context
- remove the 'check new files' setting
1 parent 22cc637 commit eb0fb7e

12 files changed

Lines changed: 13 additions & 144 deletions

File tree

‎apps/editor/package.json‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,6 @@
993993
"scope": "resource",
994994
"default": false
995995
},
996-
"codeWebChat.checkNewFiles": {
997-
"type": "boolean",
998-
"default": true,
999-
"scope": "resource"
1000-
},
1001996
"codeWebChat.sendWithShiftEnter": {
1002997
"type": "boolean",
1003998
"scope": "resource",

‎apps/editor/src/context/providers/workspace/workspace-provider.ts‎

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -447,28 +447,22 @@ export class WorkspaceProvider
447447
await this._load_all_gitignore_files()
448448
}
449449

450-
const check_new_files = vscode.workspace
451-
.getConfiguration('codeWebChat')
452-
.get<boolean>('checkNewFiles')
453-
454450
if (!this.is_excluded(is_directory ? relative_path + '/' : relative_path)) {
455-
if (check_new_files) {
456-
this._checked_items.set(
457-
created_file_path,
458-
vscode.TreeItemCheckboxState.Checked
459-
)
460-
this._checked_timestamps.set(
451+
this._checked_items.set(
452+
created_file_path,
453+
vscode.TreeItemCheckboxState.Checked
454+
)
455+
this._checked_timestamps.set(
456+
created_file_path,
457+
Math.floor(Date.now() / 1000)
458+
)
459+
460+
if (is_directory) {
461+
await this._update_directory_check_state(
461462
created_file_path,
462-
Math.floor(Date.now() / 1000)
463+
vscode.TreeItemCheckboxState.Checked,
464+
false
463465
)
464-
465-
if (is_directory) {
466-
await this._update_directory_check_state(
467-
created_file_path,
468-
vscode.TreeItemCheckboxState.Checked,
469-
false
470-
)
471-
}
472466
}
473467

474468
let dir_path = parent_dir

‎apps/editor/src/views/settings/backend/message-handlers/handle-get-check-new-files.ts‎

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

‎apps/editor/src/views/settings/backend/message-handlers/handle-update-check-new-files.ts‎

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ export * from './handle-open-ignore-patterns-settings'
3939
export * from './handle-open-allow-patterns-settings'
4040
export * from './handle-get-send-with-shift-enter'
4141
export * from './handle-update-send-with-shift-enter'
42-
export * from './handle-get-check-new-files'
43-
export * from './handle-update-check-new-files'
4442
export * from './handle-get-reuse-last-tab'
4543
export * from './handle-update-reuse-last-tab'
4644
export * from './handle-get-api-configurations'

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
handle_add_model_provider,
88
handle_update_model_provider,
99
handle_delete_model_provider,
10-
handle_get_check_new_files,
1110
handle_get_clear_checks_in_workspace_behavior,
1211
handle_get_are_automatic_checkpoints_disabled,
1312
handle_get_api_configurations,
@@ -26,7 +25,6 @@ import {
2625
handle_reorder_model_providers,
2726
handle_set_default_api_configuration,
2827
handle_select_default_api_configuration,
29-
handle_update_check_new_files,
3028
handle_update_clear_checks_in_workspace_behavior,
3129
handle_update_are_automatic_checkpoints_disabled,
3230
handle_update_commit_message_instructions,
@@ -260,10 +258,6 @@ export class SettingsViewProvider {
260258
await handle_get_send_with_shift_enter(this)
261259
} else if (message.command == 'UPDATE_SEND_WITH_SHIFT_ENTER') {
262260
await handle_update_send_with_shift_enter(message)
263-
} else if (message.command == 'GET_CHECK_NEW_FILES') {
264-
await handle_get_check_new_files(this)
265-
} else if (message.command == 'UPDATE_CHECK_NEW_FILES') {
266-
await handle_update_check_new_files(message)
267261
} else if (message.command == 'GET_REUSE_LAST_TAB') {
268262
await handle_get_reuse_last_tab(this)
269263
} else if (message.command == 'UPDATE_REUSE_LAST_TAB') {
@@ -349,7 +343,6 @@ export class SettingsViewProvider {
349343
void handle_get_gemini_user_id(this)
350344
void handle_get_ai_studio_user_id(this)
351345
void handle_get_send_with_shift_enter(this)
352-
void handle_get_check_new_files(this)
353346
void handle_get_reuse_last_tab(this)
354347
void handle_get_auto_run_intelligent_update(this)
355348
void handle_get_templates(this)

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ type Props = {
118118
gemini_user_id: number | null
119119
ai_studio_user_id: number | null
120120
send_with_shift_enter: boolean
121-
check_new_files: boolean
122121
reuse_last_tab: boolean
123122
are_automatic_checkpoints_disabled: boolean
124123
checkpoint_lifespan: number
@@ -154,7 +153,6 @@ type Props = {
154153
on_gemini_user_id_change: (id: number | null) => void
155154
on_ai_studio_user_id_change: (id: number | null) => void
156155
on_send_with_shift_enter_change: (enabled: boolean) => void
157-
on_check_new_files_change: (enabled: boolean) => void
158156
on_reuse_last_tab_change: (enabled: boolean) => void
159157
on_clear_checks_in_workspace_behavior_change: (
160158
value: 'ignore-open-editors' | 'uncheck-all'
@@ -546,8 +544,6 @@ export const Home: React.FC<Props> = (props) => {
546544
on_send_with_shift_enter_change={
547545
props.on_send_with_shift_enter_change
548546
}
549-
check_new_files={props.check_new_files}
550-
on_check_new_files_change={props.on_check_new_files_change}
551547
clear_checks_in_workspace_behavior={
552548
props.clear_checks_in_workspace_behavior
553549
}

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,10 @@ type Props = {
1919
are_automatic_checkpoints_disabled: boolean
2020
synchronize_edit_format_between_targets: boolean
2121
send_with_shift_enter: boolean
22-
check_new_files: boolean
2322
checkpoint_lifespan: number
2423
on_synchronize_edit_format_between_targets_change: (enabled: boolean) => void
2524
on_automatic_checkpoints_toggle: (disabled: boolean) => void
2625
on_send_with_shift_enter_change: (enabled: boolean) => void
27-
on_check_new_files_change: (enabled: boolean) => void
2826
on_checkpoint_lifespan_change: (hours: number | undefined) => void
2927
clear_checks_in_workspace_behavior: ClearChecksBehavior
3028
on_clear_checks_in_workspace_behavior_change: (
@@ -160,16 +158,6 @@ export const GeneralSection = forwardRef<HTMLDivElement, Props>(
160158
}
161159
>
162160
<UiGroup title={t('general.context.title')}>
163-
<UiItem
164-
title={t('general.context.check-new-files.title')}
165-
description={t('general.context.check-new-files.description')}
166-
slot_right={
167-
<UiToggler
168-
is_on={props.check_new_files}
169-
on_toggle={props.on_check_new_files_change}
170-
/>
171-
}
172-
/>
173161
<UiItem
174162
title={t(
175163
'general.context.clear-checks-in-workspace-behavior.title'

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export const Settings = () => {
100100
settings_hook.gemini_user_id !== undefined &&
101101
settings_hook.ai_studio_user_id !== undefined &&
102102
settings_hook.send_with_shift_enter !== undefined &&
103-
settings_hook.check_new_files !== undefined &&
104103
settings_hook.reuse_last_tab !== undefined &&
105104
settings_hook.clear_checks_in_workspace_behavior !== undefined &&
106105
settings_hook.auto_run_intelligent_update !== undefined &&
@@ -165,7 +164,6 @@ export const Settings = () => {
165164
gemini_user_id={settings_hook.gemini_user_id!}
166165
ai_studio_user_id={settings_hook.ai_studio_user_id!}
167166
send_with_shift_enter={settings_hook.send_with_shift_enter!}
168-
check_new_files={settings_hook.check_new_files!}
169167
reuse_last_tab={settings_hook.reuse_last_tab!}
170168
clear_checks_in_workspace_behavior={
171169
settings_hook.clear_checks_in_workspace_behavior!
@@ -224,7 +222,6 @@ export const Settings = () => {
224222
on_send_with_shift_enter_change={
225223
settings_hook.handle_send_with_shift_enter_change
226224
}
227-
on_check_new_files_change={settings_hook.handle_check_new_files_change}
228225
on_reuse_last_tab_change={settings_hook.handle_reuse_last_tab_change}
229226
on_auto_run_intelligent_update_change={
230227
settings_hook.handle_auto_run_intelligent_update_change

‎apps/editor/src/views/settings/frontend/hooks/use-settings.ts‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ export const use_settings = (vscode: any) => {
6262
const [send_with_shift_enter, set_send_with_shift_enter] = useState<
6363
boolean | undefined
6464
>(undefined)
65-
const [check_new_files, set_check_new_files] = useState<boolean | undefined>(
66-
undefined
67-
)
6865
const [reuse_last_tab, set_reuse_last_tab] = useState<boolean | undefined>(
6966
undefined
7067
)
@@ -110,7 +107,6 @@ export const use_settings = (vscode: any) => {
110107
post_message(vscode, { command: 'GET_GEMINI_USER_ID' })
111108
post_message(vscode, { command: 'GET_AI_STUDIO_USER_ID' })
112109
post_message(vscode, { command: 'GET_SEND_WITH_SHIFT_ENTER' })
113-
post_message(vscode, { command: 'GET_CHECK_NEW_FILES' })
114110
post_message(vscode, { command: 'GET_REUSE_LAST_TAB' })
115111
post_message(vscode, { command: 'GET_CLEAR_CHECKS_IN_WORKSPACE_BEHAVIOR' })
116112
post_message(vscode, { command: 'GET_AUTO_RUN_INTELLIGENT_UPDATE' })
@@ -158,8 +154,6 @@ export const use_settings = (vscode: any) => {
158154
set_ai_studio_user_id(message.aiStudioUserId)
159155
} else if (message.command == 'SEND_WITH_SHIFT_ENTER') {
160156
set_send_with_shift_enter(message.enabled)
161-
} else if (message.command == 'CHECK_NEW_FILES') {
162-
set_check_new_files(message.enabled)
163157
} else if (message.command == 'REUSE_LAST_TAB') {
164158
set_reuse_last_tab(message.enabled)
165159
} else if (message.command == 'CLEAR_CHECKS_IN_WORKSPACE_BEHAVIOR') {
@@ -389,14 +383,6 @@ export const use_settings = (vscode: any) => {
389383
})
390384
}
391385

392-
const handle_check_new_files_change = (enabled: boolean) => {
393-
set_check_new_files(enabled)
394-
post_message(vscode, {
395-
command: 'UPDATE_CHECK_NEW_FILES',
396-
enabled
397-
})
398-
}
399-
400386
const handle_reuse_last_tab_change = (enabled: boolean) => {
401387
set_reuse_last_tab(enabled)
402388
post_message(vscode, {
@@ -499,7 +485,6 @@ export const use_settings = (vscode: any) => {
499485
gemini_user_id,
500486
ai_studio_user_id,
501487
send_with_shift_enter,
502-
check_new_files,
503488
reuse_last_tab,
504489
clear_checks_in_workspace_behavior,
505490
auto_run_intelligent_update,
@@ -531,7 +516,6 @@ export const use_settings = (vscode: any) => {
531516
handle_gemini_user_id_change,
532517
handle_ai_studio_user_id_change,
533518
handle_send_with_shift_enter_change,
534-
handle_check_new_files_change,
535519
handle_reuse_last_tab_change,
536520
handle_clear_checks_in_workspace_behavior_change,
537521
handle_auto_run_intelligent_update_change,

0 commit comments

Comments
 (0)