Skip to content

SlashCommandContext

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

Read-only session context a command may surface (e.g. /status, /model).

optional configSummary?: string[]

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

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).


optional configWarnings?: string[]

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

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).


debugVisible: boolean

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

Whether the docked debug panel is currently shown (drives /debug copy).


optional dumpDebugSession?: (input) => object

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

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).

DebugDumpInput

object

archiveDir: string


optional historySearch?: (query) => string[]

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

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.

string

string[]


optional historySummary?: string[]

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

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.


optional insightsSummary?: string[]

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

GS2-7 (B20) — pre-rendered analytics lines for /insights (see formatInsightsSummary), built fail-soft by the App; omitted when no store is available.


mode: string

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


modelDisplayName: string

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


optional mouseEnabled?: boolean

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

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.


optional resolvedConfig?: unknown

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

GS2-46 — see SlashCommandContext.transcript.


toolsExpanded: boolean

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

Whether tool-call panels currently show their full args/result (drives /verbose copy).


optional transcript?: unknown[]

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

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: number

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

Count of committed turns so far (for /help-style introspection if needed).


optional turnReasonings?: string[]

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

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 (frozen in <Static>, so it can never re-expand in place). The App builds this from the transcript; omitted (empty) where there are no committed turns yet.