diff options
| author | Adam Malczewski <[email protected]> | 2026-08-12 22:01:59 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-08-12 22:01:59 +0900 |
| commit | 5f10a40b26dbfdc10b2c02cdf23ec3a7edfa9443 (patch) | |
| tree | 2f1d5ee2674d1dcc9909e89f06a82a7b10b4191a /src/app/App.test.ts | |
| parent | 774519e052fd869952cc5e05aca159e4bf978fa1 (diff) | |
| download | dispatch-web-5f10a40b26dbfdc10b2c02cdf23ec3a7edfa9443.tar.gz dispatch-web-5f10a40b26dbfdc10b2c02cdf23ec3a7edfa9443.zip | |
feat(models): numbered OpenCode credential selection, labels, migration
Adopt the numbered OPENCODE_API_KEY_N scheme in the model picker and
concurrency surfaces.
- model-select: numeric sort of opencode-<n> keys (#2 before #10); friendly
OpenCode #N labels (raw opencode-N/<model> value still selected/persisted);
migrateLegacyModelName rewrites opencode/<model> -> opencode-1/<model>.
- ModelSelector: renders friendly key labels; surfaces a disappeared saved
credential as UNAVAILABLE (disabled option + notice) without silently
switching to another model.
- app store: DEFAULT_MODEL -> opencode-1/...; catalogs no longer auto-fallback
the active model when the selected credential is absent; boot restore
migrates persisted legacy opencode/<model> tab models idempotently.
- concurrency: providerLabel renders opencode-<n> as OpenCode #<n> in the
limit rows and Add dropdown (raw provider id preserved on the wire).
- Tests: parsing/sorting/labels/migration, unavailable-state selector behavior,
no-silent-fallback, and concurrency provider label; fixtures updated to the
numbered scheme.
Verification: bun install, bun run typecheck (0 errors), bun run test
(1179 passed), bun run check (clean, exit 0), bun run build (vite OK).
Diffstat (limited to 'src/app/App.test.ts')
| -rw-r--r-- | src/app/App.test.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/app/App.test.ts b/src/app/App.test.ts index f43a6b8..06e562f 100644 --- a/src/app/App.test.ts +++ b/src/app/App.test.ts @@ -58,7 +58,7 @@ function fakeFetchImpl(): typeof fetch { return async (input: string | URL | Request): Promise<Response> => { const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url; if (url.endsWith("/models")) { - return new Response(JSON.stringify({ models: ["opencode/deepseek-v4-flash"] }), { + return new Response(JSON.stringify({ models: ["opencode-1/deepseek-v4-flash"] }), { status: 200, }); } @@ -492,7 +492,7 @@ describe("App component interaction tests", () => { const failingFetch = async (input: string | URL | Request): Promise<Response> => { const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url; if (url.endsWith("/models")) { - return new Response(JSON.stringify({ models: ["opencode/deepseek-v4-flash"] }), { + return new Response(JSON.stringify({ models: ["opencode-1/deepseek-v4-flash"] }), { status: 200, }); } |
