Skip to content

Commit c81616f

Browse files
committed
Refine file path detection logic to correctly identify paths immediately preceding a code block, even if intermediate lines are present
1 parent 853d04d commit c81616f

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

‎packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/parsers/multiple-files-parser.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,6 @@ export const parse_multiple_files = (params: {
277277
if (next_line.startsWith('```')) {
278278
is_followed_by_code_block = true
279279
break
280-
} else if (next_line !== '') {
281-
break
282280
}
283281
}
284282
if (is_followed_by_code_block) {

‎packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/test-cases/path-above-code-block/path-above-code-block.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### New File: `src/hello-world.ts`
1+
**src/hello-world.ts**
22

33
This new file
44

0 commit comments

Comments
 (0)