Repository navigation
Commit d490ab1
committed
Replace CDATA wrappers with markdown code blocks across prompt symbols and content parsers
- in 'add', prompt should be optional (saved as empty string)
- should use code block instead cdata
- simplify by removing 'nested wrappers'
- simplify by removing support for 'cdata'
├── apps
│ └── editor
│ └── src
│ ├── commands
│ │ ├── apply-response-command
│ │ │ └── utils
│ │ │ ├── preview-handler.ts
│ │ │ └── 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
│ │ │ │ ├── in-non-diff-code-block
│ │ │ │ │ ├── 1-file.txt
│ │ │ │ │ └── in-non-diff-code-block.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-and-diff
│ │ │ │ │ ├── 1-file.txt
│ │ │ │ │ ├── 2-file.txt
│ │ │ │ │ └── mix-new-file-and-diff.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
│ │ │ │ ├── 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-git-headers-separate-markdown-blocks
│ │ │ │ │ ├── 1-file.txt
│ │ │ │ │ ├── 2-file.txt
│ │ │ │ │ └── multiple-files-with-git-headers-separate-markdown-blocks.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-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
│ │ ├── code-at-cursor-command
│ │ │ ├── code-at-cursor-commands.ts
│ │ │ └── utils
│ │ │ └── perform-code-at-cursor.ts
│ │ └── generate-commit-message-command
│ │ └── actions
│ │ └── run-generate-action.ts
│ ├── features
│ │ ├── checkpoints
│ │ │ └── actions
│ │ │ └── restore-checkpoint.ts
│ │ └── search-files
│ │ └── utils
│ │ └── search-files-by-intelligent.ts
│ ├── services
│ │ └── git-discard-file-watcher.ts
│ ├── utils
│ │ ├── cleanup-api-response
│ │ │ ├── cleanup-api-response.spec.ts
│ │ │ ├── cleanup-api-response.ts
│ │ │ ├── index.ts
│ │ │ └── test-cases
│ │ │ ├── extract-code-block-surrounded-by-text
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── extract-markdown-with-surrounding-text
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── keep-think-block-not-at-start
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── markdown-block
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── plain-text
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-doctype
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-file-tags
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-files-tags
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-markdown-wrapper
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-markdown-wrapper-with-lang
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-think-block-at-start
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-think-block-with-newlines
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ ├── remove-thought-block-at-start
│ │ │ │ ├── expected.txt
│ │ │ │ └── input.txt
│ │ │ └── trim-whitespace
│ │ │ ├── expected.txt
│ │ │ └── input.txt
│ │ └── commit-message-details.ts
│ └── views
│ └── prompt
│ └── backend
│ └── utils
│ └── symbols
│ ├── fragment
│ │ └── replace-fragment-symbol.ts
│ ├── git
│ │ └── replace-git-symbols.ts
│ ├── pasted-text
│ │ └── replace-pasted-text-symbol.ts
│ ├── saved-context
│ │ └── replace-saved-context-symbol.ts
│ ├── skill
│ │ └── replace-skill-symbol.ts
│ └── website
│ └── replace-website-symbol.ts
└── packages
├── shared
│ └── src
│ └── utils
│ └── simplify-prompt-symbols
│ ├── simplify-prompt-symbols.spec.ts
│ └── simplify-prompt-symbols.ts
└── ui
└── src
└── components
└── editor
└── prompt
├── ResponsePreview
│ └── ResponsePreview.tsx
├── Responses
│ └── Responses.tsx
└── prompts
├── PromptField
│ └── hooks
│ └── use-handlers
│ └── handle-paste.ts
└── shared
└── symbols
├── get-highlighted-text.tsx
├── position-mapping.ts
├── reconstruct-raw-value.ts
└── use-symbol-deletion.ts1 parent 0895b39 commit d490ab1
28 files changed
Lines changed: 119 additions & 173 deletions
File tree
- apps/editor/src
- commands
- apply-response-command/utils
- response-parser/parsers/diff-parser
- test
- cases/within-xml-tags-with-cdata
- code-at-cursor-command
- utils
- features/search-files/utils
- utils
- cleanup-api-response
- test-cases
- nested-wrappers
- only-wrappers
- remove-cdata-wrapper
- views/prompt/backend/utils/symbols
- fragment
- git
- pasted-text
- saved-context
- skill
- website
- packages
- ui/src/components/editor/prompt/prompts
- PromptField/hooks/use-handlers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 150 | + | |
168 | 151 | | |
169 | 152 | | |
170 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | | - | |
6 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | 885 | | |
902 | 886 | | |
903 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
222 | 246 | | |
223 | 247 | | |
224 | 248 | | |
| |||
253 | 277 | | |
254 | 278 | | |
255 | 279 | | |
256 | | - | |
257 | | - | |
258 | | - | |
| 280 | + | |
259 | 281 | | |
260 | 282 | | |
261 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 75 | | |
83 | 76 | | |
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
88 | 81 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 82 | | |
103 | 83 | | |
104 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
50 | 44 | | |
| 45 | + | |
51 | 46 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
58 | 53 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
69 | 63 | | |
70 | | - | |
71 | | - | |
72 | 64 | | |
73 | 65 | | |
74 | 66 | | |
| |||
This file was deleted.
0 commit comments