feat(FN-3227): add startup model sync for opencode-go commands

- Add shared startup model sync helper and integrate it into dashboard, serve, and daemon command startup flows
- Introduce opencode-go model sync setting in core schema/types and expose it in dashboard settings UI
- Add CLI regression tests covering startup model sync behavior and command wiring
- Document the new startup model sync setting and related CLI behavior updates

Fusion-Task-Id: FN-3227
This commit is contained in:
Fusion
2026-05-04 16:25:47 -07:00
committed by gsxdsm
parent 9415d33f72
commit 1dce4ee002
14 changed files with 475 additions and 126 deletions

View File

@@ -45,6 +45,7 @@ export const DEFAULT_GLOBAL_SETTINGS = {
favoriteProviders: undefined,
favoriteModels: undefined,
openrouterModelSync: true,
opencodeGoModelSync: true,
updateCheckEnabled: true,
fnBinaryCheckEnabled: true,
updateCheckFrequency: "daily",

View File

@@ -1350,6 +1350,11 @@ export interface GlobalSettings {
* the OpenRouter API at startup so the model picker shows all available
* OpenRouter models (not just the static built-in list). Default: true. */
openrouterModelSync?: boolean;
/** When true, startup refreshes the opencode-go model catalog via
* `opencode models opencode --refresh` so model pickers expose an up-to-date
* opencode-go provider list without waiting for a later session bootstrap.
* Default: true. */
opencodeGoModelSync?: boolean;
/** When true (default), checks npm for new versions of @runfusion/fusion and
* shows update notices in the CLI and dashboard. The actual cadence is
* governed by `updateCheckFrequency`. Disabled = no automatic checks at all. */