Repository navigation
Commit 1343eb0
committed
Refactor output channel handling and improve file restore preview logic
- when applying changes, always print the markdown response that is being applied to the output channel but not focus on it (focus only when unable to apply - keep current behavior)
- Broken flow with a file rename: apply from clipboard -> 'go back' -> apply from response history -> 'go back' result: file is restored but its content not.
- Broken flow with a file rename: apply from clipboard -> 'go back' -> apply from response history -> we get a notification [Pasted text], and need to click its button "Overwrite"
├── apps
│ └── editor
│ └── src
│ ├── commands
│ │ └── apply-from-clipboard-command.ts
│ ├── constants
│ │ └── state-keys.ts
│ ├── extension.ts
│ ├── features
│ │ └── apply-response
│ │ ├── apply-response.ts
│ │ ├── response-processor
│ │ │ ├── handlers
│ │ │ │ ├── diff-handler.ts
│ │ │ │ ├── fast-replace-handler.ts
│ │ │ │ ├── restore-preview-handler.ts
│ │ │ │ ├── search-replace-handler.ts
│ │ │ │ └── truncated-handler.ts
│ │ │ └── response-processor.ts
│ │ ├── types
│ │ │ └── original-file-state.ts
│ │ └── utils
│ │ ├── file-operations
│ │ │ ├── apply-file-relocations.ts
│ │ │ ├── prepare-rename-operation.ts
│ │ │ ├── relocate-file.ts
│ │ │ └── undo-files.ts
│ │ ├── preview
│ │ │ └── build-history-files.ts
│ │ ├── preview-handler.ts
│ │ ├── response-parser
│ │ │ ├── parsers
│ │ │ │ ├── diff-parser
│ │ │ │ │ └── diff-parser.ts
│ │ │ │ └── standard-parser
│ │ │ │ └── standard-parser.ts
│ │ │ └── response-parser.ts
│ │ └── state-manager.ts
│ └── views
│ └── prompt
│ ├── backend
│ │ ├── message-handlers
│ │ │ ├── handle-apply-response-from-history.ts
│ │ │ └── handle-undo.ts
│ │ └── prompt-view-provider.ts
│ ├── frontend
│ │ ├── Main
│ │ │ ├── Main.tsx
│ │ │ └── MainView
│ │ │ └── MainView.tsx
│ │ ├── Prompt.tsx
│ │ └── hooks
│ │ └── use-response-history.ts
│ └── types
│ └── messages.ts
└── packages
└── shared
└── src
└── types
├── file-in-preview.ts
└── response-history-item.ts1 parent dfc68f6 commit 1343eb0
3 files changed
Lines changed: 24 additions & 14 deletions
File tree
- apps/editor/src/features/apply-response
- response-processor
- handlers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
366 | 370 | | |
367 | 371 | | |
368 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
369 | 377 | | |
370 | 378 | | |
371 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| |||
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
148 | | - | |
149 | 155 | | |
150 | 156 | | |
151 | 157 | | |
152 | 158 | | |
153 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
154 | 163 | | |
155 | 164 | | |
156 | 165 | | |
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
160 | 169 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 170 | | |
167 | 171 | | |
168 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | 408 | | |
411 | 409 | | |
412 | 410 | | |
| |||
0 commit comments