Skip to content

Commit 4588e46

Browse files
committed
Rename the no-context prompt type to without-files throughout the codebase
1 parent cc62759 commit 4588e46

15 files changed

Lines changed: 29 additions & 29 deletions

File tree

‎apps/browser/src/content-scripts/send-prompt-content-script/send-prompt-content-script.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const main = async () => {
203203
| 'edit-files'
204204
| 'code-at-cursor'
205205
| 'find-relevant-files'
206-
| 'no-context'
206+
| 'without-files'
207207
}
208208

209209
if (!stored_data) {

‎apps/editor/src/views/panel/backend/message-handlers/handle-copy-prompt.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const handle_copy_prompt = async (params: {
102102
)
103103

104104
const collected = await files_collector.collect_files({
105-
no_context: params.panel_provider.web_prompt_type == 'no-context',
105+
no_context: params.panel_provider.web_prompt_type == 'without-files',
106106
shrink: is_in_find_relevant_files_prompt_type && shrink_source_code
107107
})
108108
const context_text = collected.other_files + collected.recent_files

‎apps/editor/src/views/panel/backend/message-handlers/handle-preview-web-configuration.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const handle_preview_web_configuration = async (
6767
text_to_send = `<files>\n${context_text}<file path="${relative_path}">\n<![CDATA[\n${text_before_cursor}${missing_text_tag}${text_after_cursor}\n]]>\n</file>\n</files>\n${skill_definitions}${system_instructions}`
6868
} else if (panel_provider.web_prompt_type != 'code-at-cursor') {
6969
const collected =
70-
panel_provider.web_prompt_type != 'no-context'
70+
panel_provider.web_prompt_type != 'without-files'
7171
? await files_collector.collect_files({})
7272
: { other_files: '', recent_files: '' }
7373
const context_text = collected.other_files + collected.recent_files

‎apps/editor/src/views/panel/backend/message-handlers/handle-save-history.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const handle_save_history = async (
2222
case 'edit-files':
2323
key = HISTORY_EDIT_STATE_KEY
2424
break
25-
case 'no-context':
25+
case 'without-files':
2626
key = HISTORY_NO_CONTEXT_STATE_KEY
2727
break
2828
case 'code-at-cursor':

‎apps/editor/src/views/panel/backend/message-handlers/handle-save-instructions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const handle_save_instructions = async (
3030
INSTRUCTIONS_EDIT_FILES_STATE_KEY,
3131
instruction_state
3232
)
33-
} else if (prompt_type == 'no-context') {
33+
} else if (prompt_type == 'without-files') {
3434
panel_provider.no_context_instructions = instruction_state
3535
await panel_provider.context.workspaceState.update(
3636
INSTRUCTIONS_NO_CONTEXT_STATE_KEY,

‎apps/editor/src/views/panel/backend/message-handlers/handle-send-to-browser.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const handle_send_to_browser = async (params: {
142142

143143
const collected = await files_collector.collect_files({
144144
additional_paths,
145-
no_context: params.panel_provider.web_prompt_type == 'no-context',
145+
no_context: params.panel_provider.web_prompt_type == 'without-files',
146146
shrink:
147147
params.panel_provider.web_prompt_type == 'find-relevant-files' &&
148148
shrink_source_code
@@ -436,7 +436,7 @@ const resolve_web_configuration = async (params: {
436436
params.panel_provider.edit_context_instructions.instructions[
437437
params.panel_provider.edit_context_instructions.active_index
438438
] || ''
439-
} else if (params.panel_provider.web_prompt_type == 'no-context') {
439+
} else if (params.panel_provider.web_prompt_type == 'without-files') {
440440
current_instructions =
441441
params.panel_provider.no_context_instructions.instructions[
442442
params.panel_provider.no_context_instructions.active_index

‎apps/editor/src/views/panel/backend/message-handlers/handle-show-prompt-template-quick-pick.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const handle_show_prompt_template_quick_pick = async (
3535
case 'code-at-cursor':
3636
prompt_templates_key = 'promptTemplatesForCodeAtCursor'
3737
break
38-
case 'no-context':
38+
case 'without-files':
3939
prompt_templates_key = 'promptTemplatesForNoContext'
4040
break
4141
case 'find-relevant-files':

‎apps/editor/src/views/panel/backend/panel-provider.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
238238
const type = this.prompt_type
239239
if (type == 'ask-about-context') return this.ask_about_context_instructions
240240
if (type == 'edit-files') return this.edit_context_instructions
241-
if (type == 'no-context') return this.no_context_instructions
241+
if (type == 'without-files') return this.no_context_instructions
242242
if (type == 'code-at-cursor') return this.code_at_cursor_instructions
243243
return this.find_relevant_files_instructions
244244
}
@@ -277,7 +277,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
277277
(this.mode == MODE.API && this.api_prompt_type == 'find-relevant-files')
278278

279279
const is_no_context =
280-
this.mode == MODE.WEB && this.web_prompt_type == 'no-context'
280+
this.mode == MODE.WEB && this.web_prompt_type == 'without-files'
281281

282282
this.shared_context_state.switch_context_state(is_find_relevant_files)
283283

@@ -1029,7 +1029,7 @@ export class PanelProvider implements vscode.WebviewViewProvider {
10291029
'find-relevant-files',
10301030
'edit-files',
10311031
'code-at-cursor',
1032-
'no-context'
1032+
'without-files'
10331033
]
10341034

10351035
this.send_message({

‎apps/editor/src/views/panel/frontend/Main/Main.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Props = {
3838
prompt_type:
3939
| 'ask-about-context'
4040
| 'edit-files'
41-
| 'no-context'
41+
| 'without-files'
4242
| 'code-at-cursor'
4343
| 'find-relevant-files'
4444
) => void
@@ -203,7 +203,7 @@ export const Main: React.FC<Props> = (props) => {
203203
} else if (current_prompt_type == 'edit-files') {
204204
history = edit_history
205205
set_history = set_edit_history
206-
} else if (current_prompt_type == 'no-context') {
206+
} else if (current_prompt_type == 'without-files') {
207207
history = no_context_history
208208
set_history = set_no_context_history
209209
} else if (current_prompt_type == 'code-at-cursor') {
@@ -414,7 +414,7 @@ export const Main: React.FC<Props> = (props) => {
414414
if (current_prompt_type == 'ask-about-context')
415415
return props.ask_instructions
416416
if (current_prompt_type == 'edit-files') return props.edit_instructions
417-
if (current_prompt_type == 'no-context')
417+
if (current_prompt_type == 'without-files')
418418
return props.no_context_instructions
419419
return ''
420420
}
@@ -573,7 +573,7 @@ export const Main: React.FC<Props> = (props) => {
573573
? props.ask_instructions
574574
: current_prompt_type == 'edit-files'
575575
? props.edit_instructions
576-
: current_prompt_type == 'no-context'
576+
: current_prompt_type == 'without-files'
577577
? props.no_context_instructions
578578
: current_prompt_type == 'code-at-cursor'
579579
? props.code_completions_instructions
@@ -590,7 +590,7 @@ export const Main: React.FC<Props> = (props) => {
590590
current_history = ask_history
591591
} else if (current_prompt_type == 'edit-files') {
592592
current_history = edit_history
593-
} else if (current_prompt_type == 'no-context') {
593+
} else if (current_prompt_type == 'without-files') {
594594
current_history = no_context_history
595595
} else if (current_prompt_type == 'code-at-cursor') {
596596
current_history = code_completions_history

‎apps/editor/src/views/panel/frontend/Main/MainView/MainView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export const MainView: React.FC<Props> = (props) => {
173173
(props.mode == MODE.API && props.api_prompt_type == 'edit-files')
174174

175175
const is_in_no_context_prompt_type =
176-
props.mode == MODE.WEB && props.web_prompt_type == 'no-context'
176+
props.mode == MODE.WEB && props.web_prompt_type == 'without-files'
177177

178178
let warning: string | undefined
179179
if (

0 commit comments

Comments
 (0)