Gum gum-tool-output
Reference guide for Gum's Output tab system. Load this when working on the Output tab, IOutputManager, MainOutputViewModel, GuiCommands.PrintOutput, or adding output/error messages to the tool.
install
source · Clone the upstream repo
git clone https://github.com/vchelaru/Gum
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/vchelaru/Gum "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/gum-tool-output" ~/.claude/skills/vchelaru-gum-gum-tool-output && rm -rf "$T"
manifest:
.claude/skills/gum-tool-output/SKILL.mdsource content
Gum Tool Output System Reference
Architecture
(IOutputManager
Gum/Managers/MainOutputViewModel.cs) — interface with two methods:
— appends a timestamped lineAddOutput(string)
— appends a timestamped line prefixed withAddError(string)
(two spaces)"ERROR: "
— implements MainOutputViewModel
IOutputManager. Stores all output as a single OutputText string (not a list). Registered as a singleton in DI, aliased as both MainOutputViewModel and IOutputManager.
— MainOutputPlugin
PriorityPlugin that creates the Output tab at TabLocation.RightBottom.
How to Write Output
Inject
IOutputManager and call AddOutput or AddError directly — this is the standard approach. Callers must already be on the UI thread.
IGuiCommands.PrintOutput is a thin wrapper around AddOutput that marshals to the UI dispatcher — use this when calling from a background thread. There is no PrintError equivalent in IGuiCommands; callers needing AddError from a background thread must dispatch manually.
Non-Obvious Behaviors
- Buffer cap:
is capped at 50,000 chars. When exceeded, it is trimmed to the last 25,000 chars — oldest output is silently discarded.OutputText - No dispatcher in
:IOutputManager
/AddOutput
write directly to theAddError
property with no thread marshaling. Calling from a background thread will throw.OutputText - Auto-scroll: The
in the view usesTextBox
— new output scrolls into view automatically.TextBoxAutoScroll.AutoScrollToEnd="True"
Key Files
| File | Purpose |
|---|---|
| interface + implementation |
| — dispatcher-safe wrapper |
| declaration |
| Registers the Output tab |
| Output tab view (TextBox + clear button) |
| DI registration of as |