|
1 | 1 | import { PanelProvider } from '@/views/panel/backend/panel-provider' |
2 | 2 | import * as vscode from 'vscode' |
3 | 3 | import { FilesCollector } from '@/utils/files-collector' |
4 | | -import { replace_selection_placeholder } from '@/views/panel/backend/utils/replace-selection-placeholder' |
| 4 | +import { replace_selection_placeholder } from '@/views/panel/backend/utils/replace-selection-symbol' |
5 | 5 | import { apply_preset_affixes_to_instruction } from '@/utils/apply-preset-affixes' |
6 | 6 | import { replace_saved_context_placeholder } from '@/utils/replace-saved-context-placeholder' |
7 | 7 | import { |
8 | | - replace_changes_placeholder, |
9 | | - replace_context_at_commit_placeholder, |
10 | | - replace_commit_placeholder |
11 | | -} from '@/views/panel/backend/utils/replace-git-placeholders' |
| 8 | + replace_changes_symbol, |
| 9 | + replace_context_at_commit_symbol, |
| 10 | + replace_commit_symbol |
| 11 | +} from '@/views/panel/backend/utils/replace-git-symbols' |
12 | 12 | import { code_completion_instructions_for_panel } from '@/constants/instructions' |
13 | 13 | import { |
14 | 14 | get_last_selected_preset_or_group_key, |
@@ -190,40 +190,38 @@ export const handle_send_prompt = async (params: { |
190 | 190 | params.panel_provider.mode == MODE.WEB && |
191 | 191 | params.panel_provider.web_prompt_type == 'no-context' |
192 | 192 |
|
193 | | - pre_context_instructions = await replace_changes_placeholder({ |
| 193 | + pre_context_instructions = await replace_changes_symbol({ |
194 | 194 | instruction: pre_context_instructions, |
195 | 195 | workspace_provider: params.panel_provider.workspace_provider, |
196 | 196 | is_no_context_web_mode |
197 | 197 | }) |
198 | | - post_context_instructions = await replace_changes_placeholder({ |
| 198 | + post_context_instructions = await replace_changes_symbol({ |
199 | 199 | instruction: post_context_instructions, |
200 | 200 | after_context: true, |
201 | 201 | workspace_provider: params.panel_provider.workspace_provider |
202 | 202 | }) |
203 | 203 | } |
204 | 204 |
|
205 | 205 | if (pre_context_instructions.includes('#Commit:')) { |
206 | | - pre_context_instructions = await replace_commit_placeholder({ |
| 206 | + pre_context_instructions = await replace_commit_symbol({ |
207 | 207 | instruction: pre_context_instructions |
208 | 208 | }) |
209 | | - post_context_instructions = await replace_commit_placeholder({ |
| 209 | + post_context_instructions = await replace_commit_symbol({ |
210 | 210 | instruction: post_context_instructions, |
211 | 211 | after_context: true |
212 | 212 | }) |
213 | 213 | } |
214 | 214 |
|
215 | 215 | if (pre_context_instructions.includes('#ContextAtCommit:')) { |
216 | | - pre_context_instructions = |
217 | | - await replace_context_at_commit_placeholder({ |
218 | | - instruction: pre_context_instructions, |
219 | | - workspace_provider: params.panel_provider.workspace_provider |
220 | | - }) |
221 | | - post_context_instructions = |
222 | | - await replace_context_at_commit_placeholder({ |
223 | | - instruction: post_context_instructions, |
224 | | - after_context: true, |
225 | | - workspace_provider: params.panel_provider.workspace_provider |
226 | | - }) |
| 216 | + pre_context_instructions = await replace_context_at_commit_symbol({ |
| 217 | + instruction: pre_context_instructions, |
| 218 | + workspace_provider: params.panel_provider.workspace_provider |
| 219 | + }) |
| 220 | + post_context_instructions = await replace_context_at_commit_symbol({ |
| 221 | + instruction: post_context_instructions, |
| 222 | + after_context: true, |
| 223 | + workspace_provider: params.panel_provider.workspace_provider |
| 224 | + }) |
227 | 225 | } |
228 | 226 | if (pre_context_instructions.includes('#SavedContext:')) { |
229 | 227 | pre_context_instructions = await replace_saved_context_placeholder({ |
|
0 commit comments