Skip to content

Commit 159c365

Browse files
committed
Allow Website prompt symbols without hash suffixes and shorten test case directory names
- filenames `apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multiple-files-with-git-headers-separate-markdown-blocks/multiple-files-with-git-headers-separate-markdown-blocks.txt` and `apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-in-backticks-comment-with-intermediate-text/path-in-backticks-comment-with-intermediate-text.txt` are too long for windows, shorten them ├── apps │ └── editor │ └── src │ └── commands │ └── apply-response-command │ └── utils │ └── response-parser │ └── parsers │ ├── diff-parser │ │ ├── diff-parser.ts │ │ ├── helpers │ │ │ ├── block-utils.ts │ │ │ ├── index.ts │ │ │ ├── patch-utils.ts │ │ │ └── path-utils.ts │ │ ├── index.ts │ │ └── test │ │ ├── cases │ │ │ ├── deletion-via-header │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── deletion-via-header.txt │ │ │ ├── deletion-via-redundant-header │ │ │ │ ├── 1-file.txt │ │ │ │ └── deletion-via-redundant-header.txt │ │ │ ├── file-deletion │ │ │ │ ├── 1-file.txt │ │ │ │ └── file-deletion.txt │ │ │ ├── git-and-hunk-header-same-line │ │ │ │ ├── 1-file.txt │ │ │ │ └── git-and-hunk-header-same-line.txt │ │ │ ├── git-broken-hunk-header │ │ │ │ ├── 1-file.txt │ │ │ │ └── git-broken-hunk-header.txt │ │ │ ├── git-two-header-types │ │ │ │ ├── 1-file.txt │ │ │ │ └── git-two-header-types.txt │ │ │ ├── ignore-ellipsis │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── ignore-ellipsis.txt │ │ │ ├── inner-backticks │ │ │ │ ├── 1-file.txt │ │ │ │ └── inner-backticks.txt │ │ │ ├── inner-triple-backticks │ │ │ │ ├── 1-file.txt │ │ │ │ └── inner-triple-backticks.txt │ │ │ ├── markdown-missing-ending │ │ │ │ ├── 1-file.txt │ │ │ │ └── markdown-missing-ending.txt │ │ │ ├── markdown-path-above │ │ │ │ ├── 1-file.txt │ │ │ │ └── markdown-path-above.txt │ │ │ ├── markdown-path-above-no-hunk-header │ │ │ │ ├── 1-file.txt │ │ │ │ └── markdown-path-above-no-hunk-header.txt │ │ │ ├── markdown-path-above-with-text-containing-path │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── markdown-path-above-with-text-containing-path.txt │ │ │ ├── markdown-redundant-closing-backticks │ │ │ │ ├── 1-file.txt │ │ │ │ └── markdown-redundant-closing-backticks.txt │ │ │ ├── markdown-repeated-path-above │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── markdown-repeated-path-above.txt │ │ │ ├── markdown-unnecessary-empty-lines │ │ │ │ ├── 1-file.txt │ │ │ │ └── markdown-path-above.txt │ │ │ ├── mix-delete-and-new-file │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── mix-delete-and-new-file.txt │ │ │ ├── mix-new-file-from-heading-and-diff │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-file.txt │ │ │ │ ├── 3-file.txt │ │ │ │ └── mix-new-file-from-heading-and-diff.txt │ │ │ ├── mix-new-file-from-xml-tag-heading-and-diff │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-file.txt │ │ │ │ ├── 3-file.txt │ │ │ │ └── mix-new-file-from-xml-tag-heading-and-diff.txt │ │ │ ├── mix-new-file-xml-and-diff-variant-1 │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── mix-new-file-xml-and-diff-variant-1.txt │ │ │ ├── mix-new-file-xml-and-diff-variant-2 │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── mix-new-file-xml-and-diff-variant-2.txt │ │ │ ├── mix-rename-and-update │ │ │ │ ├── 1-file.txt │ │ │ │ └── mix-rename-and-update.txt │ │ │ ├── mix-rename-one-liner-and-diff │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── mix-rename-one-liner-and-diff.txt │ │ │ ├── multi-files-git-sep-blocks │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multi-files-git-sep-blocks.txt │ │ │ ├── multiple-edits-for-the-same-file │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-edits-for-the-same-file.txt │ │ │ ├── multiple-files-git-and-hunk-header-same-line │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-git-and-hunk-header-same-line.txt │ │ │ ├── multiple-files-no-markdown-block │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-no-markdown-block.txt │ │ │ ├── multiple-files-no-prefix-single-markdown-block │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-no-prefix-single-markdown-block.txt │ │ │ ├── multiple-files-same-line-backticks │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-same-line-backticks.txt │ │ │ ├── multiple-files-separate-markdown-blocks │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-separate-markdown-blocks.txt │ │ │ ├── multiple-files-single-markdown-block │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-single-markdown-block.txt │ │ │ ├── multiple-files-text-between │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-file.txt │ │ │ │ ├── 3-text.txt │ │ │ │ ├── 4-file.txt │ │ │ │ ├── 5-text.txt │ │ │ │ └── multiple-files-text-between.txt │ │ │ ├── multiple-files-with-git-headers-no-file-lines │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-with-git-headers-no-file-lines.txt │ │ │ ├── multiple-files-with-quoted-paths │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-with-quoted-paths.txt │ │ │ ├── multiple-files-with-timestamps │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-files-with-timestamps.txt │ │ │ ├── multiple-new-files-separate-markdown-blocks │ │ │ │ ├── 1-file.txt │ │ │ │ ├── 2-file.txt │ │ │ │ └── multiple-new-files-separate-markdown-blocks.txt │ │ │ ├── new-file-based-on-empty-file │ │ │ │ ├── 1-file.txt │ │ │ │ └── new-file-based-on-empty-file.txt │ │ │ ├── new-file-with-git-header │ │ │ │ ├── 1-file.txt │ │ │ │ └── new-file-with-git-header.txt │ │ │ ├── no-markdown-or-git-header │ │ │ │ ├── 1-file.txt │ │ │ │ └── no-markdown-or-git-header.txt │ │ │ ├── no-prefix │ │ │ │ ├── 1-file.txt │ │ │ │ └── no-prefix.txt │ │ │ ├── non-diff-code-blocks │ │ │ │ ├── 1-text.txt │ │ │ │ ├── 2-inline-file.txt │ │ │ │ ├── 3-file.txt │ │ │ │ └── non-diff-code-blocks.txt │ │ │ ├── rename │ │ │ │ ├── 1-file.txt │ │ │ │ └── rename.txt │ │ │ ├── with-empty-lines-between │ │ │ │ ├── 1-file.txt │ │ │ │ └── with-empty-lines-between.txt │ │ │ ├── with-git-header-no-file-lines │ │ │ │ ├── 1-file.txt │ │ │ │ └── with-git-header-no-file-lines.txt │ │ │ ├── with-git-header-no-markdown │ │ │ │ ├── 1-file.txt │ │ │ │ └── with-git-header-no-markdown.txt │ │ │ ├── with-quoted-paths │ │ │ │ ├── 1-file.txt │ │ │ │ └── with-quoted-paths.txt │ │ │ ├── with-timestamps │ │ │ │ ├── 1-file.txt │ │ │ │ └── with-timestamps.txt │ │ │ ├── with-xml-file-path │ │ │ │ ├── 1-file.txt │ │ │ │ └── with-xml-file-path.txt │ │ │ ├── within-xml-tags │ │ │ │ ├── 1-file.txt │ │ │ │ └── within-xml-tags.txt │ │ │ ├── within-xml-tags-unquoted-path │ │ │ │ ├── 1-file.txt │ │ │ │ └── within-xml-tags-unquoted-path.txt │ │ │ └── within-xml-tags-with-cdata │ │ │ ├── 1-file.txt │ │ │ └── within-xml-tags-with-cdata.txt │ │ └── diff-parser.spec.ts │ └── standard-parser │ ├── helpers │ │ ├── create-or-update-file-item.ts │ │ ├── extract-and-set-workspace-path.ts │ │ ├── flush-text-block.ts │ │ └── process-conflict-markers.ts │ ├── index.ts │ ├── standard-parser.ts │ └── test │ ├── cases │ │ ├── code-block-without-newlines │ │ │ ├── 1-file.txt │ │ │ └── code-block-without-newlines.txt │ │ ├── conflict-with-inline-file │ │ │ ├── 1-file.txt │ │ │ ├── 2-conflict-with-inline-file.txt │ │ │ └── conflict-with-inline-file.txt │ │ ├── delete-file-header │ │ │ ├── 1-text.txt │ │ │ ├── 2-file.txt │ │ │ ├── 3-text.txt │ │ │ └── delete-file-header.txt │ │ ├── merge-conflicts-file-path-as-bold-text │ │ │ ├── 1-file.txt │ │ │ └── merge-conflicts-file-path-as-bold-text.txt │ │ ├── merge-conflicts-in-separate-code-blocks │ │ │ ├── 1-file.txt │ │ │ └── merge-conflicts-in-separate-code-blocks.txt │ │ ├── merge-conflicts-merge-the-same-file │ │ │ ├── 1-text.txt │ │ │ ├── 2-file.txt │ │ │ └── merge-conflicts-merge-the-same-file.txt │ │ ├── merge-conflicts-three-dots │ │ │ ├── 1-file.txt │ │ │ └── merge-conflicts-three-dots.txt │ │ ├── multiple-markdowns-with-headings │ │ │ ├── 1-file.txt │ │ │ ├── 2-file.txt │ │ │ └── multiple-markdowns-with-headings.txt │ │ ├── path-above-code-block │ │ │ ├── 1-text.txt │ │ │ ├── 2-file.txt │ │ │ └── path-above-code-block.txt │ │ ├── path-above-code-block-bold │ │ │ ├── 1-file.txt │ │ │ └── path-above-code-block-bold.txt │ │ ├── path-above-code-block-raw │ │ │ ├── 1-file.txt │ │ │ └── path-above-code-block-raw.txt │ │ ├── path-above-code-block-renaming │ │ │ ├── 1-file.txt │ │ │ └── path-above-code-block-renaming.txt │ │ ├── path-backticks-comment-text │ │ │ ├── 1-text.txt │ │ │ ├── 2-file.txt │ │ │ └── path-backticks-comment-text.txt │ │ ├── path-in-backticks-no-intermediate-empty-lines │ │ │ ├── 1-file.txt │ │ │ └── path-in-backticks-no-intermediate-empty-lines.txt │ │ └── text-below-code-block │ │ ├── 1-file.txt │ │ ├── 2-text.txt │ │ └── text-below-code-block.txt │ └── standard-parser.spec.ts └── packages └── shared └── src └── utils └── simplify-prompt-symbols ├── simplify-prompt-symbols.spec.ts └── simplify-prompt-symbols.ts
1 parent 6840794 commit 159c365

9 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multiple-files-with-git-headers-separate-markdown-blocks/1-file.txt renamed to apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multi-files-git-sep-blocks/1-file.txt

File renamed without changes.

apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multiple-files-with-git-headers-separate-markdown-blocks/2-file.txt renamed to apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multi-files-git-sep-blocks/2-file.txt

File renamed without changes.

apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multiple-files-with-git-headers-separate-markdown-blocks/multiple-files-with-git-headers-separate-markdown-blocks.txt renamed to apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/cases/multi-files-git-sep-blocks/multi-files-git-sep-blocks.txt

File renamed without changes.

‎apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/test/diff-parser.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ describe('diff-parser', () => {
195195

196196
it('parses multiple diffs with git headers each in their own markdown code block', () => {
197197
const test_case =
198-
'multiple-files-with-git-headers-separate-markdown-blocks'
198+
'multi-files-git-sep-blocks'
199199
const text = load_test_case_file(test_case, `${test_case}.txt`)
200200
const result = parse_response({
201201
response: text,

apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-in-backticks-comment-with-intermediate-text/1-text.txt renamed to apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-backticks-comment-text/1-text.txt

File renamed without changes.

apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-in-backticks-comment-with-intermediate-text/2-file.txt renamed to apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-backticks-comment-text/2-file.txt

File renamed without changes.

apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-in-backticks-comment-with-intermediate-text/path-in-backticks-comment-with-intermediate-text.txt renamed to apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/cases/path-backticks-comment-text/path-backticks-comment-text.txt

File renamed without changes.

‎apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/standard-parser.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ describe('standard-parser', () => {
209209
})
210210

211211
it('extracts file path from commented backticks even with intermediate text before code block', () => {
212-
const test_case = 'path-in-backticks-comment-with-intermediate-text'
212+
const test_case = 'path-backticks-comment-text'
213213
const text = load_test_case_file(test_case, `${test_case}.txt`)
214214
const result = parse_response({
215215
response: text,

‎packages/shared/src/utils/simplify-prompt-symbols/simplify-prompt-symbols.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const simplify_prompt_symbols = (params: { prompt: string }): string => {
2323
'[Pasted text]'
2424
)
2525
simplified = simplified.replace(
26-
/#Website\([^ ]+ [a-fA-F0-9]+:\d+(?: "(?:\\.|[^"\\])*")?\)/g,
26+
/#Website\([^ ]+(?: [a-fA-F0-9]+:\d+(?: "(?:\\.|[^"\\])*")?)?\)/g,
2727
'[Website]'
2828
)
2929
simplified = simplified.replace(/ ?#AccuracyBoost ?/g, ' ')

0 commit comments

Comments
 (0)