File tree Expand file tree Collapse file tree
views/panel/backend/message-handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11export 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
Original file line number Diff line number Diff line change 11import * as vscode from 'vscode'
22import axios from 'axios'
33import { 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'
55import { FilesCollector } from '@/utils/files-collector'
66import {
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
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { FilesCollector } from '@/utils/files-collector'
44import { replace_selection_placeholder } from '@/views/panel/backend/utils/replace-selection-placeholder'
55import { replace_changes_placeholder } from '@/views/panel/backend/utils/replace-changes-placeholder'
66import { 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'
88import { apply_preset_affixes_to_instruction } from '@/utils/apply-preset-affixes'
99import { MAIN_VIEW_TYPES } from '@/views/panel/types/home-view-type'
1010import { 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
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { replace_selection_placeholder } from '@/views/panel/backend/utils/repla
55import { apply_preset_affixes_to_instruction } from '@/utils/apply-preset-affixes'
66import { replace_saved_context_placeholder } from '@/utils/replace-saved-context-placeholder'
77import { 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'
99import {
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
You can’t perform that action at this time.
0 commit comments