Skip to content

Commit c7e9af2

Browse files
committed
Rename checked files terminology to selected files across editor extension
- should refer to 'selected files' as selected files, not checked files ├── apps │ ├── browser │ │ └── src │ │ └── content-scripts │ │ └── send-prompt-content-script │ │ └── chatbots │ │ └── ai-studio.ts │ └── editor │ └── src │ ├── commands │ │ ├── agentic-search-command │ │ │ └── agentic-search-command.ts │ │ ├── apply-response-command │ │ │ ├── response-processor │ │ │ │ ├── handlers │ │ │ │ │ └── restore-preview-handler.ts │ │ │ │ └── response-processor.ts │ │ │ ├── types │ │ │ │ └── original-file-state.ts │ │ │ └── utils │ │ │ └── preview │ │ │ ├── build-history-files.ts │ │ │ ├── file-preparer.ts │ │ │ └── workspace-listener.ts │ │ ├── history-command │ │ │ └── actions │ │ │ └── restore-checkpoint.ts │ │ ├── search-files-commands │ │ │ ├── search-files-commands.ts │ │ │ └── utils │ │ │ └── prompt-for-provided-results.ts │ │ ├── select-definition-file-command.ts │ │ └── select-referencing-files-commands │ │ └── utils │ │ └── prompt-for-referencing-files.ts │ ├── constants │ │ └── state-keys.ts │ ├── context │ │ ├── context-initialization.ts │ │ ├── providers │ │ │ ├── open-editors │ │ │ │ └── open-editors-provider.ts │ │ │ └── workspace │ │ │ ├── modules │ │ │ │ └── token-calculator.ts │ │ │ └── workspace-provider.ts │ │ └── shared-context-state.ts │ ├── features │ │ ├── context-restoration │ │ │ └── utils │ │ │ └── select-context-paths.ts │ │ └── search-files │ │ └── utils │ │ └── show-search-results-quick-pick.ts │ ├── utils │ │ ├── changes-integration │ │ │ └── diff-processor │ │ │ └── test-cases │ │ │ └── generic-5 │ │ │ ├── diff.txt │ │ │ ├── expected.txt │ │ │ └── original.txt │ │ └── show-parent-folder-quick-pick.ts │ └── views │ ├── prompt │ │ ├── backend │ │ │ └── message-handlers │ │ │ ├── handle-agentic-search.ts │ │ │ ├── handle-at-sign-quick-pick.ts │ │ │ └── handle-toggle-file-in-preview.ts │ │ ├── frontend │ │ │ ├── Home │ │ │ │ └── hooks │ │ │ │ └── use-tasks.ts │ │ │ ├── Prompt.tsx │ │ │ └── hooks │ │ │ └── use-preview-manager.ts │ │ └── types │ │ └── messages.ts │ └── shared │ └── forms │ └── EditWebConfigurationForm │ └── EditWebConfigurationForm.tsx └── packages ├── shared │ └── src │ └── types │ ├── file-in-preview.ts │ └── task.ts └── ui └── src └── components └── editor ├── common │ ├── Checkbox │ │ ├── Checkbox.module.scss │ │ ├── Checkbox.stories.tsx │ │ └── Checkbox.tsx │ ├── DropdownMenu │ │ └── DropdownMenu.tsx │ ├── Field │ │ └── Field.stories.tsx │ ├── Radio │ │ ├── Radio.module.scss │ │ ├── Radio.stories.tsx │ │ └── Radio.tsx │ ├── SimpleCheckbox │ │ ├── SimpleCheckbox.module.scss │ │ ├── SimpleCheckbox.stories.tsx │ │ └── SimpleCheckbox.tsx │ └── Toggler │ ├── Toggler.module.scss │ └── Toggler.tsx ├── prompt │ ├── PresetOption │ │ ├── PresetOption.stories.tsx │ │ └── PresetOption.tsx │ ├── ResponsePreview │ │ ├── ResponsePreview.stories.tsx │ │ ├── ResponsePreview.tsx │ │ └── components │ │ └── FileItem │ │ └── FileItem.tsx │ └── Tasks │ ├── Tasks.module.scss │ ├── Tasks.stories.tsx │ ├── Tasks.tsx │ └── components │ └── TaskGroup.tsx └── settings └── SortableList └── SortableList.stories.tsx
1 parent 8a3b80e commit c7e9af2

53 files changed

Lines changed: 418 additions & 412 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/editor/src/commands/agentic-search-command/agentic-search-command.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@ export const agentic_search_command = (params: {
3333

3434
if (!result || result === 'back') return
3535

36-
const currently_checked = params.workspace_provider.get_checked_files()
36+
const currently_selected =
37+
params.workspace_provider.get_selected_files()
3738

3839
const unchecked_paths = result.matched_paths.filter(
3940
(file_path) => !result.selected_paths.includes(file_path)
4041
)
4142

4243
const paths_to_apply = [
4344
...new Set([
44-
...currently_checked.filter((p) => !unchecked_paths.includes(p)),
45+
...currently_selected.filter((p) => !unchecked_paths.includes(p)),
4546
...result.selected_paths
4647
])
4748
]
4849

49-
await params.workspace_provider.set_checked_files(paths_to_apply)
50+
await params.workspace_provider.set_selected_files(paths_to_apply)
5051

5152
Logger.info({
5253
message: `Selected ${result.selected_paths.length} files from agentic search.`,

‎apps/editor/src/commands/apply-response-command/response-processor/response-processor.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const process_response = async (params: {
126126
const shared_context_state =
127127
params.prompt_view_provider.shared_context_state
128128

129-
const current_checked_files = shared_context_state.get_checked_files()
129+
const current_selected_files = shared_context_state.get_selected_files()
130130

131131
const workspace_roots = params.workspace_provider.get_workspace_roots()
132132

@@ -176,7 +176,7 @@ export const process_response = async (params: {
176176
}
177177

178178
if (absolute_path && matched_workspace_root) {
179-
const is_checked = current_checked_files.includes(absolute_path)
179+
const is_checked = current_selected_files.includes(absolute_path)
180180

181181
local_files.push({
182182
file_path: rel_path,

‎apps/editor/src/commands/apply-response-command/utils/preview-handler.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ export const preview_handler = async (params: {
150150
}
151151

152152
const selected_files_by_workspace = new Map<string, string[]>()
153-
const checked_files = params.workspace_provider.get_checked_files()
154-
for (const file of checked_files) {
153+
const selected_files = params.workspace_provider.get_selected_files()
154+
for (const file of selected_files) {
155155
const workspace_root =
156156
params.workspace_provider.get_workspace_root_for_file(file)
157157
if (workspace_root) {

‎apps/editor/src/commands/code-at-cursor-command/utils/show-ghost-text.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export const show_ghost_text = async (params: {
1717
const selected_files: string[] = []
1818

1919
if (workspace_root) {
20-
const checked_files = params.workspace_provider.get_checked_files()
21-
for (const file of checked_files) {
20+
const selected_files = params.workspace_provider.get_selected_files()
21+
for (const file of selected_files) {
2222
const file_workspace_root =
2323
params.workspace_provider.get_workspace_root_for_file(file)
2424
if (file_workspace_root === workspace_root) {

‎apps/editor/src/commands/copy-markdown-command.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export const copy_markdown_commands = (
5454
'codeWebChat.copyMarkdownOpenEditors',
5555
async () => {
5656
if (!open_editors_provider) return
57-
const checked_files = open_editors_provider.get_checked_files()
57+
const selected_files = open_editors_provider.get_selected_files()
5858

59-
if (checked_files.length == 0) {
59+
if (selected_files.length == 0) {
6060
vscode.window.showWarningMessage(
6161
t('command.copy-markdown-command.warning.no-open-editors')
6262
)
@@ -68,7 +68,7 @@ export const copy_markdown_commands = (
6868
const is_multi_root =
6969
!!workspace_folders && workspace_folders.length > 1
7070

71-
for (const file_path of checked_files) {
71+
for (const file_path of selected_files) {
7272
try {
7373
const file_uri = vscode.Uri.file(file_path)
7474
const content_uint8_array =

‎apps/editor/src/commands/copy-paths-command.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ export const copy_paths_commands = (
127127
) => {
128128
return [
129129
vscode.commands.registerCommand('codeWebChat.copyPaths', async () => {
130-
const checked_files = workspace_provider.get_checked_files()
130+
const selected_files = workspace_provider.get_selected_files()
131131

132-
if (checked_files.length == 0) {
132+
if (selected_files.length == 0) {
133133
vscode.window.showWarningMessage(t('common.warning.no-files-selected'))
134134
return
135135
}
136136

137137
const format = await resolve_format(extension_context)
138138
if (!format) return
139139

140-
const paths_text = format_paths(checked_files, format)
140+
const paths_text = format_paths(selected_files, format)
141141
await vscode.env.clipboard.writeText(paths_text)
142142
vscode.window.showInformationMessage(
143143
t('common.info.copied-to-clipboard', { item: 'Paths' })
@@ -148,9 +148,9 @@ export const copy_paths_commands = (
148148
'codeWebChat.copyPathsOpenEditors',
149149
async () => {
150150
if (!open_editors_provider) return
151-
const checked_files = open_editors_provider.get_checked_files()
151+
const selected_files = open_editors_provider.get_selected_files()
152152

153-
if (checked_files.length == 0) {
153+
if (selected_files.length == 0) {
154154
vscode.window.showWarningMessage(
155155
t('common.warning.no-files-selected')
156156
)
@@ -160,7 +160,7 @@ export const copy_paths_commands = (
160160
const format = await resolve_format(extension_context)
161161
if (!format) return
162162

163-
const paths_text = format_paths(checked_files, format)
163+
const paths_text = format_paths(selected_files, format)
164164
await vscode.env.clipboard.writeText(paths_text)
165165
vscode.window.showInformationMessage(
166166
t('common.info.copied-to-clipboard', { item: 'Paths' })

‎apps/editor/src/commands/duplicate-workspace-command.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const duplicate_workspace_command = (
4040
RANGES_STATE_KEY
4141
)
4242
const context_to_save: DuplicateWorkspaceContext = {
43-
checked_files: export_state.checked_files,
44-
checked_files_timestamps: export_state.checked_timestamps,
43+
selected_files: export_state.selected_files,
44+
selected_files_timestamps: export_state.selected_timestamps,
4545
workspace_root_folders,
4646
timestamp: Date.now(),
4747
open_editors,

‎apps/editor/src/commands/history-command/actions/create-temporary-checkpoint.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export const create_temporary_checkpoint = async (
127127
trigger: 'temporary',
128128
uses_git,
129129
git_data: Object.keys(git_data).length > 0 ? git_data : undefined,
130-
checked_files: workspace_provider.get_all_checked_paths(),
130+
selected_files: workspace_provider.get_all_selected_paths(),
131131
active_tabs
132132
}
133133
return new_checkpoint

‎apps/editor/src/commands/history-command/actions/restore-checkpoint.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as vscode from 'vscode'
55
import {
66
TEMPORARY_CHECKPOINT_STATE_KEY,
77
CHECKPOINT_OPERATION_IN_PROGRESS_STATE_KEY,
8-
CONTEXT_CHECKED_PATHS_STATE_KEY
8+
CONTEXT_SELECTED_PATHS_STATE_KEY
99
} from '@/constants/state-keys'
1010
import { WorkspaceProvider } from '@/context/providers/workspace/workspace-provider'
1111
import type { Checkpoint } from '@/features/checkpoints/types'
@@ -486,12 +486,12 @@ export const restore_checkpoint = async (params: {
486486
} catch {}
487487
}
488488

489-
if (params.checkpoint.checked_files) {
489+
if (params.checkpoint.selected_files) {
490490
await params.extension_context.workspaceState.update(
491-
CONTEXT_CHECKED_PATHS_STATE_KEY,
492-
params.checkpoint.checked_files
491+
CONTEXT_SELECTED_PATHS_STATE_KEY,
492+
params.checkpoint.selected_files
493493
)
494-
params.workspace_provider.load_checked_files_state()
494+
params.workspace_provider.load_selected_files_state()
495495
}
496496

497497
await params.extension_context.workspaceState.update(

‎apps/editor/src/commands/save-file-selection-command/actions/save-to-json-file.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ export const save_to_json_file = async (params: {
209209
continue
210210
}
211211

212-
const checked_files = params.workspace_provider.get_checked_files()
213-
const files_by_workspace = group_files_by_workspace(checked_files)
212+
const selected_files = params.workspace_provider.get_selected_files()
213+
const files_by_workspace = group_files_by_workspace(selected_files)
214214

215215
if (selection.label === LABEL_SAVE_NEW_CONTEXT) {
216216
const name = await ask_for_new_context_name(true)

0 commit comments

Comments
 (0)