Skip to content

Commit ebd1009

Browse files
committed
Remove truncation comment filtering to process all code blocks regardless of ellipsis content
1 parent 01b8733 commit ebd1009

6 files changed

Lines changed: 2 additions & 53 deletions

File tree

packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/extract-diff-patches/extract-diffs.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -663,23 +663,6 @@ const extract_all_code_block_patches = (params: {
663663
? lines.slice(block.start, block.end + 1)
664664
: lines.slice(block.start + 1, block.end)
665665

666-
if (block.type != 'diff' && block.type != 'patch') {
667-
const has_truncation_comment = block_lines.some((line) => {
668-
const trimmed = line.trim()
669-
return (
670-
trimmed.startsWith('// ...') ||
671-
trimmed.startsWith('# ...') ||
672-
trimmed.startsWith('/* ...') ||
673-
trimmed.startsWith('* ...') ||
674-
trimmed.startsWith('-- ...') ||
675-
trimmed.startsWith('<!-- ...')
676-
)
677-
})
678-
if (has_truncation_comment) {
679-
continue
680-
}
681-
}
682-
683666
const text_before = lines
684667
.slice(last_block_end + 1, block.start)
685668
.filter((line) => {

packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/test-cases/diff-mix-new-file-and-diff copy/1-file.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/test-cases/diff-mix-new-file-and-diff copy/2-file.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/test-cases/diff-mix-new-file-and-diff copy/diff-mix-new-file-and-diff.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
Lorem ipsum `src/index.ts`
2-
3-
```ts
4-
console.log();
5-
// ...
6-
```
1+
Top.

packages/vscode/src/commands/apply-chat-response-command/utils/clipboard-parser/test-cases/diff-multiple-files-text-between/diff-multiple-files-text-between.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
Lorem ipsum `src/index.ts`
2-
3-
```ts
4-
console.log();
5-
// ...
6-
```
7-
1+
Top.
82

93
```diff
104
--- a/src/lorem.ts

0 commit comments

Comments
 (0)