/** * Generic model-pick request — the reusable side of the /model overlay. * * `requestModelPick(title)` opens the SAME two-step provider→model picker * as the /model command, but in purpose 'pick': Enter RESOLVES the returned * promise with the selection instead of switching the session model, and * every close path (Esc at step 1, global overlay close, a competing open) * resolves null. Callers: the Brain panel (pool/voters/judge) — and any * future surface that needs a model choice. */ import React from 'react'; import type { Action } from '../app-action-type.js'; export type ModelPickSelection = { providerId: string; model: string; } | null; export interface UseModelPickRequestOptions { dispatch: React.Dispatch; getPickableProviders?: (() => Promise>) | undefined; /** Live `state.modelPicker.open` — closes without a pick resolve null. */ pickerOpen: boolean; } export interface ModelPickRequestController { /** Open the shared picker; resolves with the choice or null on cancel. */ requestModelPick: (title: string) => Promise; /** Wired into the key hook as `onModelPicked` (purpose 'pick' Enter). */ handleModelPicked: (providerId: string, modelId: string) => void; } export declare function useModelPickRequest(opts: UseModelPickRequestOptions): ModelPickRequestController; //# sourceMappingURL=use-model-pick.d.ts.map