SlashCommandContext
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:71
Read-only session context a command may surface (e.g. /status, /model).
Properties
Section titled “Properties”autocompact?
Section titled “autocompact?”
optionalautocompact?:AutocompactStatus
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:107
EXT-161 — the preventive compaction threshold in force, for /status.
A snapshot rather than a live read because run is synchronous and resolving a window can do
I/O. The surface refreshes it when the session starts and again whenever /autocompact
changes it, which is what makes /status report a session override rather than the seeded
value it replaced. Omitted on a surface with no resolved model (the fixture agent), where
/status simply says nothing about compaction instead of claiming a state it cannot know.
configSummary?
Section titled “configSummary?”
optionalconfigSummary?:string[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:119
Pre-rendered, secret-free summary lines of the resolved config, surfaced read-only by
/config (GS2-1). The App builds these once from the resolved config (see
formatConfigSummary); omitted where no config is loaded (e.g. the fixture agent).
configWarnings?
Section titled “configWarnings?”
optionalconfigWarnings?:string[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:125
TUI-C19 — the actual config-validation warnings (unknown keys / deprecated names) captured at
load, so /config can render the DETAILS the standing “config has problems” advisory line
points at. Empty/omitted ⇒ /config shows only the resolved summary (a clean config).
conversationId?
Section titled “conversationId?”
optionalconversationId?:number
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:93
GS2-20 — the conversation this session is recording under, as gth history list numbers it,
so /status can name what gth history resume <id> would take. Undefined when nothing is
being recorded (history off, the store did not open, or a surface with no store at all).
debugVisible
Section titled “debugVisible”debugVisible:
boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:97
Whether the docked debug panel is currently shown (drives /debug copy).
dumpDebugSession?
Section titled “dumpDebugSession?”
optionaldumpDebugSession?: (input) =>object
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:170
GS2-46 — fs-writing implementation for /debug-dump: writes an UNSANITIZED archive
(transcript, resolved config, env/version info, the in-memory debugLog ring buffer, and
best-effort git repo state) to ~/.gsloth/debug-dumps/<timestamp>/ and returns its path.
Injected by the App the same way historySearch is (GS2-7), so this module stays pure and
testable with a fake — the real writer (packages/core/src/utils/debugDump.ts) does the
actual I/O. Omitted ⇒ /debug-dump reports itself unavailable (fixture / no session state).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
archiveDir
Section titled “archiveDir”archiveDir:
string
historySearch?
Section titled “historySearch?”
optionalhistorySearch?: (query) =>string[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:144
GS2-7 (B20) — a fail-soft search provider for /search <query>, bound by the App to the local
history store (returns already-formatted result lines). Injected (rather than the command
touching the DB) so the registry stays pure and testable with a stub. Omitted when no store is
available, in which case /search reports that history is unavailable.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string[]
historySummary?
Section titled “historySummary?”
optionalhistorySummary?:string[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:132
GS2-7 (B20) / GS2-19 — pre-rendered recent-conversation lines for /history. The App builds
these fail-soft from the local history store (see formatConversationList); omitted when no
store is available (history never enabled / DB missing), in which case /history shows an
“unavailable” notice.
insightsSummary?
Section titled “insightsSummary?”
optionalinsightsSummary?:string[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:137
GS2-7 (B20) — pre-rendered analytics lines for /insights (see formatInsightsSummary),
built fail-soft by the App; omitted when no store is available.
keyBindings?
Section titled “keyBindings?”
optionalkeyBindings?: readonlyKeyBindingGroup[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:181
TUI-C63 — the key bindings THIS surface actually has, grouped by context, appended to /help.
Supplied by the surface rather than held as a constant here, because this registry is shared
(GS2-8) and the two surfaces have different keyboards: the full-screen TUI owns its conversation
region and every key that scrolls it, while the readline session has no Ink components, no mouse
layer and the terminal’s own scrollback — so wheel, PgUp/PgDn, Ctrl+Home/Ctrl+End and Ctrl+T
mean nothing there. Readline passes nothing and its /help stays the command list alone.
GS2-87: the divergence is deliberate and stated, never accidental.
mode:
string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:72
modelDisplayName
Section titled “modelDisplayName”modelDisplayName:
string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:73
modelProviderType?
Section titled “modelProviderType?”
optionalmodelProviderType?:string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:85
CFG-38 — the resolved provider (config.modelProviderType, the raw llm.type the loader
stashes), so /status and /model can render the shared model (provider) spelling instead
of a model id that is ambiguous on its own (the same id is served by anthropic and by
openrouter, and an OpenAI-compatible endpoint answers to a name that says nothing about who
is serving it).
Optional and legitimately absent — a module config hands the loader an already-built
BaseChatModel, so there is no provider string to stash. That case renders the bare model
with nothing extra, which is what modelProviderLabel does with an absent provider.
mouseEnabled?
Section titled “mouseEnabled?”
optionalmouseEnabled?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:113
TUI-C37 — whether terminal mouse reporting is currently on (drives /mouse copy). Undefined on
surfaces that have no mouse layer at all, where /mouse reports itself unavailable rather than
claiming a state it cannot change.
resolvedConfig?
Section titled “resolvedConfig?”
optionalresolvedConfig?:unknown
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:161
GS2-46 — see SlashCommandContext.transcript.
toolsExpanded
Section titled “toolsExpanded”toolsExpanded:
boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:95
Whether tool-call panels currently show their full args/result (drives /verbose copy).
transcript?
Section titled “transcript?”
optionaltranscript?:unknown[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:159
GS2-46 — the live transcript (all committed turns, tool calls + results) and the resolved
config, for /debug-dump. Kept opaque (unknown) so this pure module stays decoupled from
the TUI’s TranscriptItem type and GthConfig — forwarded as-is into the injected
dumpDebugSession writer (see DebugDumpInput). Omitted where no session state is
available (e.g. the fixture agent), in which case /debug-dump reports itself unavailable.
turnCount
Section titled “turnCount”turnCount:
number
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:87
Count of committed turns so far (for /help-style introspection if needed).
turnReasonings?
Section titled “turnReasonings?”
optionalturnReasonings?:string[]
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:151
TUI-C18 — the reasoning text of each committed assistant turn, in transcript order (index 0 =
turn 1). '' for a turn that produced no thinking layer. Drives /reasoning, which reprints a
committed turn’s thinking. The App builds this from the transcript; omitted (empty) where there
are no committed turns yet.