Commit 0d52e7d
authored
refactor: extract CLI execution into cliExec module with improved UX (#875)
Consolidate all Coder CLI invocations (version, speedtest, ping,
terminal spawning) into a dedicated module, replacing the scattered
helpers that previously lived across commands and utility files.
Key improvements:
- CLI errors now surface stderr to the user instead of the raw
exec message which includes the full command line and arguments.
- Speed test and ping can be launched from the sidebar on any
workspace, not just the one currently connected.
- Speed test duration input is validated before submission.
- Binary resolution tries a local lookup before falling back to a
network fetch, making repeat commands faster when the binary is
already cached.
- Shared workspace-picker logic is deduplicated across commands.1 parent d998ac2 commit 0d52e7d
File tree
17 files changed
+680
-461
lines changed- src
- core
- remote
- test
- fixtures/scripts
- unit/core
- utils
17 files changed
+680
-461
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 262 | | |
269 | 263 | | |
270 | 264 | | |
| |||
327 | 321 | | |
328 | 322 | | |
329 | 323 | | |
330 | | - | |
| 324 | + | |
331 | 325 | | |
332 | 326 | | |
333 | 327 | | |
| |||
379 | 373 | | |
380 | 374 | | |
381 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| |||
401 | 403 | | |
402 | 404 | | |
403 | 405 | | |
404 | | - | |
| 406 | + | |
405 | 407 | | |
406 | 408 | | |
407 | 409 | | |
| |||
415 | 417 | | |
416 | 418 | | |
417 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
418 | 428 | | |
419 | 429 | | |
420 | 430 | | |
| |||
523 | 533 | | |
524 | 534 | | |
525 | 535 | | |
526 | | - | |
| 536 | + | |
527 | 537 | | |
528 | 538 | | |
529 | | - | |
530 | | - | |
531 | | - | |
| 539 | + | |
532 | 540 | | |
533 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
534 | 544 | | |
535 | 545 | | |
536 | 546 | | |
| |||
0 commit comments