/** * The reasoning-effort picker. * * Effort is part of the same mutable selection ref `/model` writes, and the * agent's scoped prompt assembly reads it per step — so setting it is one * assignment, and a change made mid-turn lands on the next step rather than * splitting a request. The levels are NOT hardcoded: an adapter publishes the * efforts it accepts for one exact route, and a deployment that disables thinking * publishes only `off`. Offering a level the adapter never advertised would fail * at the provider, one turn later, with an error the user cannot act on. * @module dshline/reasoning */ import type { Context } from '@deepseek-ai/cordis'; import type { ModelSelectionRef } from '@deepseek-ai/dsh-agent'; import type { LlmModelReasoningInfo, LlmReasoningEffortInfo } from '@deepseek-ai/dsh-llm'; import type { SelectionOutcome } from './selection.ts'; /** * The effort an argument names, if any. * * Matched case-insensitively against the ids the adapter published, and the * adapter's own entry is returned rather than the typed text. Those ids are * already branded, so carrying one through needs no cast — and a word that * matched nothing is rejected instead of being branded on trust. * @param argument - the text after the command name. * @param efforts - what the adapter advertises for the current route. * @returns the matching effort, or undefined when nothing matched. */ export declare function resolveEffort(argument: string, efforts: readonly LlmReasoningEffortInfo[]): LlmReasoningEffortInfo | undefined; /** * The values `/reasoning` accepts, for completing its argument. * * The clearing word is listed last, after the adapter's own levels, because it * is not one of them: it removes a selection rather than making one. * @param reasoning - what the adapter published for the current route. * @returns each accepted word and what it does. */ export declare function reasoningValues(reasoning: LlmModelReasoningInfo | undefined): readonly { value: string; note?: string; }[]; /** * How the status line names the current effort, when it is worth naming. * * Only a non-default level is reported, for the reason the card-detail segment is: * the deployment's default is a fact the user did not choose, and printing it on * every frame spends columns to say nothing. An adapter that publishes no default * makes any explicit choice worth showing, since there is nothing to be the same as. * @param effort - the effort the selection carries, when it carries one. * @param reasoning - what the adapter published for the current route. * @returns the level's id, or undefined when it should stay quiet. */ export declare function effortLabel(effort: string | undefined, reasoning: LlmModelReasoningInfo | undefined): string | undefined; /** * Set the reasoning effort, from an argument or from a picker. * @param ctx - context carrying the slot registry. * @param selection - the agent's mutable selection ref. * @param reasoning - what the adapter published for the current route, when resolved. * @param argument - the text after `/reasoning`; empty opens the picker. * @param options - the initiating gesture's authority and picker withdrawal signal. * @returns a typed line to report, or undefined on picker dismissal or retirement * before the shared selection/default save is admitted. */ export declare function pickReasoning(ctx: Context, selection: ModelSelectionRef, reasoning: LlmModelReasoningInfo | undefined, argument: string, options?: { readonly mayAct?: () => boolean; readonly signal?: AbortSignal; }): Promise; //# sourceMappingURL=reasoning.d.ts.map