Commit aa93c58
dashboard: use 'opencode --pure models' for model discovery
The config-page model dropdowns populate by running 'opencode models' (and a
login-shell fallback) in short-lived subprocesses. A plain 'opencode models'
boots the full OpenCode runtime and loads every configured external plugin. The
AFT plugin in particular spawns a native indexer daemon on load; when this
discovery process exits (or is killed by the 8s timeout), that daemon detaches,
reparents to launchd, and pegs 50-65% CPU. Every dashboard open spawned another.
'--pure' is a global OpenCode option (placed before the subcommand) that zeroes
external plugin origins, so no external plugin loads and nothing like AFT's
daemon is spawned, while built-in provider-auth plugins still load so the
printed provider/model list is unchanged. Applied to all three opencode
discovery sites (candidate binaries, Windows where.exe fallback, login-shell
fallback). The Pi path (pi --list-models) is unaffected.
Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>1 parent 8e086aa commit aa93c58
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
706 | 713 | | |
707 | | - | |
| 714 | + | |
708 | 715 | | |
709 | 716 | | |
710 | 717 | | |
| |||
714 | 721 | | |
715 | 722 | | |
716 | 723 | | |
717 | | - | |
| 724 | + | |
718 | 725 | | |
719 | 726 | | |
720 | 727 | | |
| |||
725 | 732 | | |
726 | 733 | | |
727 | 734 | | |
728 | | - | |
| 735 | + | |
729 | 736 | | |
730 | 737 | | |
731 | 738 | | |
| |||
0 commit comments