Skip to content

Commit 5bdf2e6

Browse files
committed
Ensure patches are correctly formatted as markdown code blocks when passed to the intelligent update handler
1 parent 5cfb28e commit 5bdf2e6

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/vscode/src/commands/apply-chat-response-command/apply-chat-response-command.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,11 @@ export function apply_chat_response_command(context: vscode.ExtensionContext) {
601601

602602
// Convert all patches to clipboard format for intelligent update
603603
const all_patches_text = clipboard_content.patches
604-
.map((patch) => `// ${patch.file_path}\n${patch.content}`)
605-
.join('\n\n')
604+
.map(
605+
(patch) =>
606+
`\`\`\`\n// ${patch.file_path}\n${patch.content}\n\`\`\``
607+
)
608+
.join('\n')
606609

607610
try {
608611
const intelligent_update_states = await handle_intelligent_update(

0 commit comments

Comments
 (0)