Skip to content

resolveReasoning

resolveReasoning(reasonings, args): SlashCommandResult

Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:798

TUI-C18 — resolve a /reasoning invocation against the committed turns’ reasoning (in transcript order, index 0 = turn 1). Pure, so the whole selection + friendly-notice logic is unit-testable without React:

  • no arg → the most recent turn that actually recorded thinking; if none exists, a friendly info notice (nothing to show).
  • <n> → turn n (1-based). A non-positive / non-integer / out-of-range n → a warn notice; a valid turn that recorded no thinking → an info notice. Otherwise a reprintReasoning request.

The App renders a reprintReasoning result as a fresh reasoning block (reusing the TUI-C15 styling) and a notice result via the shared CommandNotice.

string[]

string[]

SlashCommandResult