Commit fcc8666
authored
feat: add shell command execution support (#150)
* fix: improve context clearing in new sessions and file mentions
- Clear attachments when starting a new session with /new command
- Toggle file removal when selecting already-mentioned files with @ trigger
- Fixes issue where context persisted across new sessions
- Fixes issue where @ file selection only added files, never removed them
* feat(input_window): add shell command execution support
- enable executing shell commands prefixed with '!' in input window
- display command output in a dedicated output window
- prompt user to append command and output to input context
- handle command execution errors and notify user on failure
- touches(ui): update input window interactions and context management
* feat(ui): clear output window when user selects No to prompt
- adjust confirmation dialog to clear the output window based on choice
- update unit tests to ensure desired behavior on user selection
- ensures consistent UI experience in input output handling
* update1 parent 698c7f8 commit fcc8666
File tree
4 files changed
+445
-12
lines changed- lua/opencode/ui
- completion
- tests/unit
4 files changed
+445
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
| 280 | + | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
| |||
75 | 80 | | |
76 | 81 | | |
77 | 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 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
78 | 153 | | |
79 | 154 | | |
80 | 155 | | |
| |||
160 | 235 | | |
161 | 236 | | |
162 | 237 | | |
| 238 | + | |
| 239 | + | |
163 | 240 | | |
164 | 241 | | |
165 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | 317 | | |
319 | 318 | | |
320 | | - | |
321 | 319 | | |
322 | 320 | | |
323 | 321 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
| 322 | + | |
330 | 323 | | |
331 | 324 | | |
332 | 325 | | |
| |||
335 | 328 | | |
336 | 329 | | |
337 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
338 | 334 | | |
339 | 335 | | |
340 | 336 | | |
341 | 337 | | |
342 | 338 | | |
343 | 339 | | |
344 | | - | |
345 | 340 | | |
346 | 341 | | |
347 | 342 | | |
| |||
0 commit comments