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

@@ -55,6 +55,7 @@ Defaults from `DEFAULT_GLOBAL_SETTINGS`; key scope from `GLOBAL_SETTINGS_KEYS`.
| `favoriteProviders` | `string[]` | `undefined` | Pinned providers shown first in model selectors. |
| `favoriteModels` | `string[]` | `undefined` | Pinned models in `{provider}/{modelId}` format. |
| `openrouterModelSync` | `boolean` | `true` | Sync OpenRouter model catalog into model pickers at startup. |
| `opencodeGoModelSync` | `boolean` | `true` | Sync opencode-go model catalog at startup via `opencode models opencode --refresh`, normalizing discovered `opencode/...` IDs into the `opencode-go` provider surface used by `/api/models`. |
| `updateCheckEnabled` | `boolean` | `true` | When enabled, Fusion performs a daily npm registry check for new `@runfusion/fusion` versions and shows update notices in CLI/dashboard. |
| `autoReloadOnVersionChange` | `boolean` | `true` | When enabled (default), the dashboard automatically reloads when a new build version is detected via `/version.json` polling or service worker activation. Set to `false` to suppress automatic reloads — the user must manually refresh to pick up updates. |
| `modelOnboardingComplete` | `boolean` | `undefined` | Whether AI onboarding has been completed or dismissed. |