diff options
| author | Adam Malczewski <[email protected]> | 2026-09-24 19:20:37 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-09-24 19:20:37 +0900 |
| commit | 591e2dbe5cbf2283d58debdf92943a075edc4569 (patch) | |
| tree | 11ee2481ed79f257cd6303f44992471ec9282237 /.dispatch | |
| parent | 6556e70e396ec7cc9b2311ef60e00c81722777c7 (diff) | |
| download | dispatch-web-591e2dbe5cbf2283d58debdf92943a075edc4569.tar.gz dispatch-web-591e2dbe5cbf2283d58debdf92943a075edc4569.zip | |
feat(search-backend-selection): Search backend dropdown in Settings
- New features/search-settings: pure view-model (options = available backends
∪ 'None (search disabled)', unconfigured entries disabled with a suffix,
unknown persisted selection prepended, network-seam normalization) + the
SearchBackendField dropdown (save-on-change, spinner/saved/error states,
revert-to-persisted on failure, 503 -> disabled field with a 'search not
available' hint, loading skeleton, help text noting search-mode-only scope).
- store.svelte.ts: searchBackendConfig() / setSearchBackend() over the global
GET/PUT /search/config routes (503 marked unavailable on the failure variant).
- SettingsPane renders the field under the chat limit; ExtensionsPane lists
the new module manifest.
- .dispatch mirrors: wire + transport-contract deltas for the new types/routes.
Diffstat (limited to '.dispatch')
| -rw-r--r-- | .dispatch/transport-contract.reference.md | 17 | ||||
| -rw-r--r-- | .dispatch/wire.reference.md | 30 |
2 files changed, 47 insertions, 0 deletions
diff --git a/.dispatch/transport-contract.reference.md b/.dispatch/transport-contract.reference.md index e0f8f52..0a3a347 100644 --- a/.dispatch/transport-contract.reference.md +++ b/.dispatch/transport-contract.reference.md @@ -1236,3 +1236,20 @@ export interface SetConcurrencyCooldownRequest { } ``` + +--- + +## 2026-09-24 delta (search-backend-selection — ADDITIVE, no version bump) + +GLOBAL search-backend selection routes (the `web_search` tool's search-mode engine; scrape/crawl +ALWAYS route to the self-hosted Firecrawl client; the tool's `map` mode is REMOVED entirely): + +- `GET /search/config` → `SearchBackendConfigResponse` (`{ backend, available: SearchBackendAvailability[] }` + — re-exported from `@dispatch/wire`, see the wire delta below). When the `tool-web-search` extension + is NOT loaded the route degrades like heartbeat: 200 with the defaults (`backend: "firecrawl"`, + firecrawl-only availability). +- `PUT /search/config` body `UpdateSearchConfigRequest` (`{ backend: string }`) → 200 + `SearchBackendConfigResponse` | 400 (`{ error }` — unknown or not-configured backend) | 503 + (service not loaded). The umans entry appears in `available` only when the backend has + `UMANS_API_KEY`; an unconfigured backend is listed but `configured: false` — the UI disables it, + it is never an error. diff --git a/.dispatch/wire.reference.md b/.dispatch/wire.reference.md index 5379b11..6e8daff 100644 --- a/.dispatch/wire.reference.md +++ b/.dispatch/wire.reference.md @@ -822,3 +822,33 @@ export interface ComputerEntry extends Computer { readonly usageCount: number; } ``` + +--- + +## 2026-09-24 delta (search-backend-selection — ADDITIVE) + +The global search-backend selection wire types (`GET/PUT /search/config`, GLOBAL — not +workspace-scoped) shipped in `@dispatch/wire` (transport-contract re-exports them): + +```ts +/** The selected backend id. `"none"` = search off (scrape/crawl keep working). */ +export type SearchBackendId = "firecrawl" | "umans" | "none"; + +/** One dropdown entry; `configured` is the availability gate (umans: UMANS_API_KEY resolves; firecrawl: always). */ +export interface SearchBackendAvailability { + readonly id: string; + readonly label: string; + readonly configured: boolean; +} + +/** Response of `GET /search/config` — the selection + every registered backend's availability. */ +export interface SearchBackendConfigResponse { + readonly backend: string; + readonly available: readonly SearchBackendAvailability[]; +} + +/** Body of `PUT /search/config` — select a backend by id (or `"none"`). */ +export interface UpdateSearchConfigRequest { + readonly backend: string; +} +``` |
