/** * `/enter` — what plain `enter` does while a turn is running. * * Separated from the command's registration for the reason `/theme` is: the * decision, the wording, and the report are testable without a terminal, an * agent, or a settings provider, while the registration that supplies the picker * and the transcript is not. * * The command follows this interface's existing grammar — a value changes it, a * bare name asks — and it is also the one place that TEACHES the alternate * gesture. `ctrl-enter` cannot be advertised in the composer, because a terminal * that does not implement an enhanced keyboard encoding sends the same bytes for * it as for `enter` and there is nothing to ask, so a hint naming it would tell * most readers to press a key that quietly does the other thing. Saying it here * costs nobody a wrong keystroke: the reader is already looking at the setting. * @module dshline/enter */ import type { BusyEnter } from './delivery.ts'; /** What each value means, for the picker and for `/enter`'s own completion. */ export declare const BUSY_ENTER_CHOICES: readonly { value: BusyEnter; label: string; description: string; }[]; /** The seams `/enter` needs, each supplied by the attachment. */ export interface EnterCommandSpec { /** What plain busy `enter` means right now. */ readonly current: () => BusyEnter; /** * Adopt a choice for this window, before anything is stored. * * Applied first and unconditionally, exactly as `/theme` applies a palette: a * profile with no settings provider must still be able to change this for the * process it is running in, and the next submission has to honour what the * reader just said whether or not a document could be written. */ readonly apply: (value: BusyEnter) => void; /** Print the report into the transcript. */ readonly commit: (lines: readonly string[]) => void; /** Ask which one, when the reader named none. Undefined means dismissed. */ readonly choose: (current: BusyEnter) => Promise; /** * Store the choice, returning a phrase for the report when it could not be. * * Optional so the command can be exercised without a settings namespace at * all, and never awaited before {@link EnterCommandSpec.apply}. */ readonly remember?: (value: BusyEnter) => Promise; } /** * Run `/enter`. * @param spec - the seams the command acts through. * @param rawInput - exactly what followed the command name. * @returns when the report has been printed. */ export declare function runEnterCommand(spec: EnterCommandSpec, rawInput: string): Promise; //# sourceMappingURL=enter.d.ts.map