Skip to content

Commit 058e4a2

Browse files
committed
Include workspace context when formatting failed Git patches for intelligent update fallback
1 parent 41774cc commit 058e4a2

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎packages/vscode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gemini-coder",
33
"displayName": "Code Web Chat",
44
"description": "No-cost AI coding in free chatbots (CWC)",
5-
"version": "1.447.0",
5+
"version": "1.448.0",
66
"scripts": {
77
"build": "npx vsce package --no-dependencies",
88
"vscode:prepublish": "rimraf out && npm run compile",

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,12 @@ export const apply_chat_response_command = (
661661
}
662662

663663
const failed_patches_as_code_blocks = failed_patches
664-
.map(
665-
(patch) =>
666-
`\`\`\`\n// ${patch.file_path}\n${patch.content}\n\`\`\``
667-
)
664+
.map((patch) => {
665+
const file_path_with_workspace = patch.workspace_name
666+
? `${patch.workspace_name}/${patch.file_path}`
667+
: patch.file_path
668+
return `\`\`\`\n// ${file_path_with_workspace}\n${patch.content}\n\`\`\``
669+
})
668670
.join('\n')
669671

670672
try {

0 commit comments

Comments
 (0)