Commit 1d38a20
authored
Built-in slash commands (/new, /model, /compact, /session, /name,
/fork, /resume, /reload, /export, /copy, /quit) were not autocompleted
or dispatched locally — they were sent verbatim as prompts, causing the
LLM to respond about them instead of executing them.
Dispatch table and autocomplete
Data-driven table in ui.el maps command names to existing handler
functions with an :args spec (nil, optional, required). Autocomplete
in input.el merges builtin names with RPC-provided commands.
Dispatch in render.el replaces the old /compact-only special case.
Fix session state reads in menu functions
Menu functions (model description, thinking description, select-model)
read pi-coding-agent--state directly, but state is buffer-local in the
chat buffer. When called from the input buffer, state was nil giving
'unknown'. New --menu-state accessor reads via buffer-local-value.
Model selector improvements
Shortened display names (Opus 4.6 not Claude Opus 4.6), matching the
header-line. Case-insensitive flex completion so 'opus' matches
'Opus 4.6' and 'code' matches 'GPT-5.1 Codex Max'. Unique flex
match auto-selects without opening the picker (/model op46 sets
Opus 4.6 directly). No match prints a message; multiple matches
open the picker pre-filled.
Argument passing for /model and /export
/model accepts optional search text as initial-input.
/export accepts optional output path, sent as :outputPath in the RPC.
Interactive C-c C-p e now prompts for export path (RET for default).
1 parent 17f7e6e commit 1d38a20
File tree
7 files changed
+404
-29
lines changed- test
7 files changed
+404
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
361 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
364 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | | - | |
77 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
81 | | - | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
414 | 424 | | |
415 | 425 | | |
416 | 426 | | |
417 | | - | |
418 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
419 | 430 | | |
420 | 431 | | |
421 | 432 | | |
422 | 433 | | |
423 | 434 | | |
424 | | - | |
| 435 | + | |
| 436 | + | |
425 | 437 | | |
426 | 438 | | |
427 | | - | |
428 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
429 | 443 | | |
430 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
431 | 447 | | |
432 | 448 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
437 | 472 | | |
438 | 473 | | |
439 | 474 | | |
| |||
561 | 596 | | |
562 | 597 | | |
563 | 598 | | |
564 | | - | |
565 | | - | |
566 | | - | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
567 | 605 | | |
568 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
569 | 611 | | |
570 | 612 | | |
571 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
376 | 398 | | |
377 | 399 | | |
378 | | - | |
379 | | - | |
380 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
381 | 403 | | |
382 | 404 | | |
383 | 405 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 406 | + | |
| 407 | + | |
390 | 408 | | |
391 | 409 | | |
392 | 410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
875 | 897 | | |
876 | 898 | | |
877 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2022 | 2022 | | |
2023 | 2023 | | |
2024 | 2024 | | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
2025 | 2036 | | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
2026 | 2051 | | |
2027 | 2052 | | |
2028 | 2053 | | |
| |||
0 commit comments