Skip to content

Commit 763b97e

Browse files
committed
Place edit format system instructions before post‑context instructions instead of appending them
1 parent 2c960ba commit 763b97e

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export const handle_copy_prompt = async (params: {
184184
if (edit_format_instructions) {
185185
const system_instructions = `<system>\n${edit_format_instructions}\n</system>`
186186
pre_context_instructions += `\n${system_instructions}`
187-
post_context_instructions += `\n${system_instructions}`
187+
post_context_instructions = `${system_instructions}\n${post_context_instructions}`
188188
}
189189
}
190190

‎packages/vscode/src/views/panel/backend/message-handlers/handle-edit-context.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ const perform_context_editing = async (params: {
383383
if (edit_format_instructions) {
384384
const system_instructions = `<system>\n${edit_format_instructions}\n</system>`
385385
loop_pre_context_instructions += `\n${system_instructions}`
386-
loop_post_context_instructions += `\n${system_instructions}`
386+
loop_post_context_instructions = `${system_instructions}\n${loop_post_context_instructions}`
387387
}
388388

389389
// Use instructions placement setting to determine message structure

‎packages/vscode/src/views/panel/backend/message-handlers/handle-preview-preset.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const handle_preview_preset = async (
171171
if (edit_format_instructions) {
172172
const system_instructions = `<system>\n${edit_format_instructions}\n</system>`
173173
pre_context_instructions += `\n${system_instructions}`
174-
post_context_instructions += `\n${system_instructions}`
174+
post_context_instructions = `${system_instructions}\n${post_context_instructions}`
175175
}
176176
}
177177

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export const handle_send_prompt = async (params: {
258258
if (edit_format_instructions) {
259259
const system_instructions = `<system>\n${edit_format_instructions}\n</system>`
260260
pre_context_instructions += `\n${system_instructions}`
261-
post_context_instructions += `\n${system_instructions}`
261+
post_context_instructions = `${system_instructions}\n${post_context_instructions}`
262262
}
263263
}
264264

0 commit comments

Comments
 (0)