Skip to content

Commit d093952

Browse files
committed
Rename chat_code_completion_instructions to code_completion_instructions_for_panel for clarity and consistency across files
1 parent 2dacd22 commit d093952

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎packages/vscode/src/constants/instructions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const code_completion_instructions =
22
'Find correct replacement for the <missing_text> symbol. Respond with replacement text within "replacement" XML tags, without explanations or any other text.'
33

4-
export const chat_code_completion_instructions = (
4+
export const code_completion_instructions_for_panel = (
55
file_path: string,
66
row: number,
77
column: number

‎packages/vscode/src/views/panel/backend/message-handlers/handle-code-completion.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as vscode from 'vscode'
22
import axios from 'axios'
33
import { make_api_request } from '@/utils/make-api-request'
4-
import { chat_code_completion_instructions } from '@/constants/instructions'
4+
import { code_completion_instructions_for_panel } from '@/constants/instructions'
55
import { FilesCollector } from '@/utils/files-collector'
66
import {
77
ModelProvidersManager,
@@ -315,7 +315,7 @@ const perform_code_completion = async (params: {
315315
)
316316

317317
const relative_path = vscode.workspace.asRelativePath(document.uri)
318-
const main_instructions = chat_code_completion_instructions(
318+
const main_instructions = code_completion_instructions_for_panel(
319319
relative_path,
320320
position.line,
321321
position.character

‎packages/vscode/src/views/panel/backend/message-handlers/handle-copy-prompt.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FilesCollector } from '@/utils/files-collector'
44
import { replace_selection_placeholder } from '@/views/panel/backend/utils/replace-selection-placeholder'
55
import { replace_changes_placeholder } from '@/views/panel/backend/utils/replace-changes-placeholder'
66
import { replace_saved_context_placeholder } from '@/utils/replace-saved-context-placeholder'
7-
import { chat_code_completion_instructions } from '@/constants/instructions'
7+
import { code_completion_instructions_for_panel } from '@/constants/instructions'
88
import { apply_preset_affixes_to_instruction } from '@/utils/apply-preset-affixes'
99
import { MAIN_VIEW_TYPES } from '@/views/panel/types/home-view-type'
1010
import { dictionary } from '@shared/constants/dictionary'
@@ -68,7 +68,7 @@ export const handle_copy_prompt = async (params: {
6868
const workspace_folder = vscode.workspace.workspaceFolders?.[0].uri.fsPath
6969
const relative_path = active_path.replace(workspace_folder + '/', '')
7070

71-
const instructions = `${chat_code_completion_instructions(
71+
const instructions = `${code_completion_instructions_for_panel(
7272
relative_path,
7373
position.line,
7474
position.character

‎packages/vscode/src/views/panel/backend/message-handlers/handle-send-prompt.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { replace_selection_placeholder } from '@/views/panel/backend/utils/repla
55
import { apply_preset_affixes_to_instruction } from '@/utils/apply-preset-affixes'
66
import { replace_saved_context_placeholder } from '@/utils/replace-saved-context-placeholder'
77
import { replace_changes_placeholder } from '@/views/panel/backend/utils/replace-changes-placeholder'
8-
import { chat_code_completion_instructions } from '@/constants/instructions'
8+
import { code_completion_instructions_for_panel } from '@/constants/instructions'
99
import {
1010
get_last_group_or_preset_choice_state_key,
1111
get_last_selected_group_state_key,
@@ -110,7 +110,7 @@ export const handle_send_prompt = async (params: {
110110

111111
const relative_path = vscode.workspace.asRelativePath(document.uri)
112112

113-
const main_instructions = chat_code_completion_instructions(
113+
const main_instructions = code_completion_instructions_for_panel(
114114
relative_path,
115115
position.line,
116116
position.character

0 commit comments

Comments
 (0)