Repository navigation
Commit 4027c6e
committed
Add status bars to apply changes from clipboard or active CLI terminal
- in prompt view: should actively listen to terminals, if there is one in the front that is at the 'edit' temp folder - e.g. `cwc-cli-edit-2`, should display status bar above prompt field: `'Apply from terminal?' [Apply]`
- should not watch for changes in terminal sandbox and ever show [Pasted text] notification
- shouldn't check_active_terminal read cwd from different place? this is how terminal's object looks upon editor reload [Pasted text]
- reading the terminal cwd should be an util in `apps/editor/src/utils`
- we need to be able to easily determine if the response is applilcable from the outside - should create an util in `apps/editor/src/utils`, potentially importing stuff from the 'apply-response' feature.
- Prompt View, when in 'WEB' target, should read clipboard text whenever edior window gains focus. When clipboard text is applicable `apps/editor/src/utils/is-response-applicable.ts`, should display status bar: `Clipboard contains applicable response [Apply]`
- once applied from clipboard, should clear its value with e.g. [Pasted text] and update `PromptViewProvider.clipboard_has_applicable_response`
- before doing [Fragment], recheck if response is applicable. also the warning notification if not, should be disaptched from the `apps/editor/src/commands/apply-from-clipboard-command.ts` command, not the feature
- move [Pasted text] to `apps/editor/src/i18n/translations/commands/apply-from-clipboard-command.ts`, while updating key name appropriately
├── apps
│ └── editor
│ ├── package.json
│ └── src
│ ├── commands
│ │ ├── apply-from-clipboard-command.ts
│ │ ├── apply-from-terminal-command.ts
│ │ └── index.ts
│ ├── context
│ │ └── helpers
│ │ └── get-all-workspace-files.ts
│ ├── extension.ts
│ ├── features
│ │ └── apply-response
│ │ ├── apply-response.ts
│ │ ├── response-processor
│ │ │ └── response-processor.ts
│ │ └── utils
│ │ ├── preview
│ │ │ └── preview.ts
│ │ └── response-parser
│ │ ├── index.ts
│ │ ├── parsers
│ │ │ ├── code-at-cursor-parser
│ │ │ │ ├── code-at-cursor-parser.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── test
│ │ │ │ └── code-at-cursor-parser.spec.ts
│ │ │ ├── commit-message-parser
│ │ │ │ ├── commit-message-parser.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── test
│ │ │ │ └── commit-message-parser.spec.ts
│ │ │ ├── diff-parser
│ │ │ │ ├── diff-parser.ts
│ │ │ │ ├── helpers
│ │ │ │ │ ├── block-utils.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── patch-utils.ts
│ │ │ │ │ └── path-utils.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── test
│ │ │ │ └── diff-parser.spec.ts
│ │ │ ├── index.ts
│ │ │ ├── intelligent-file-search-results-parser
│ │ │ │ ├── index.ts
│ │ │ │ └── intelligent-file-search-results-parser.ts
│ │ │ ├── patch-repair-parser
│ │ │ │ ├── index.ts
│ │ │ │ ├── patch-repair-parser.ts
│ │ │ │ └── test
│ │ │ │ └── patch-repair-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
│ │ │ └── standard-parser.spec.ts
│ │ └── response-parser.ts
│ ├── i18n
│ │ └── translations
│ │ └── commands
│ │ ├── apply-from-clipboard-command.ts
│ │ ├── apply-from-terminal-command.ts
│ │ ├── apply-response-command.ts
│ │ └── index.ts
│ ├── utils
│ │ ├── agentic-cli-invocation
│ │ │ ├── index.ts
│ │ │ └── invoke-agentic-cli.ts
│ │ ├── get-terminal-cwd.ts
│ │ └── is-response-applicable.ts
│ └── views
│ └── prompt
│ ├── backend
│ │ ├── message-handlers
│ │ │ ├── handle-apply.ts
│ │ │ ├── handle-invoke-agentic-cli.ts
│ │ │ ├── handle-mode-changed.ts
│ │ │ └── handle-patch-repair.ts
│ │ └── prompt-view-provider.ts
│ ├── frontend
│ │ ├── Main
│ │ │ ├── Main.tsx
│ │ │ └── MainView
│ │ │ ├── MainView.module.scss
│ │ │ └── MainView.tsx
│ │ └── i18n
│ │ └── translations
│ │ └── prompt-field.ts
│ └── types
│ └── messages.ts
└── packages
└── ui
└── src
└── components
└── editor
├── common
│ └── prompts
│ └── PromptField
│ ├── PromptField.module.scss
│ └── PromptField.tsx
└── prompt-view
└── StatusBar
├── StatusBar.module.scss
├── StatusBar.tsx
└── index.ts1 parent c8c8da3 commit 4027c6e
21 files changed
Lines changed: 342 additions & 152 deletions
File tree
- apps/editor/src
- commands
- features/apply-response
- response-processor
- i18n/translations
- commands
- views/prompt/handlers
- utils
- agentic-cli-invocation
- views/prompt
- backend
- message-handlers
- frontend
- Main
- MainView
- i18n/translations
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
20 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
21 | 48 | | |
22 | 49 | | |
23 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 102 | + | |
113 | 103 | | |
114 | 104 | | |
115 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | 309 | | |
313 | 310 | | |
314 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | 403 | | |
408 | 404 | | |
409 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 74 | | |
112 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 56 | | |
75 | 57 | | |
76 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
This file was deleted.
0 commit comments