Adding a Pet to Your Coding Assistant: Designing a State Visualization Plugin
This article explores why decorative developer tools often gain more traction than productivity-focused ones, and uses that insight to design a companion-style state indicator for AI coding assistants. It covers the "state black box" problem during long waits, a strict three-state design (idle, running, done), an event-driven state machine instead of polling, terminal and GUI rendering with graceful fallback, and plugin distribution with customizable assets. The result is a zero-cost, reusable layer that makes long-running tasks visible and predictable.
1. The Pattern: Serious Tools Go Unnoticed, Casual Decorations Go Viral
Developer tooling has a recurring mismatch: “productivity” extensions built with heavy investment often launch into silence, while a “decorative” extension with almost no real function can attract attention and get forked repeatedly. The author of the source material lived through exactly this—several helper plugins aimed at “boosting output” fell flat, and the only one copied and extended by strangers was a plugin that simply swapped the interface background image.
This is worth abstracting rather than dismissing as chance. A productivity extension’s value depends on a workflow the user already has: they must first admit the pain point exists, then be willing to change their habits. A decorative extension has near-zero adoption cost—it changes no workflow and only adds enjoyment and a sense of companionship, so it is easier to try, show off, and share. The takeaway for developers is not “building tools is pointless,” but rather: when a category of need is already covered by mainstream products, incremental innovation tends to happen at the experience layer, not the feature layer.
2. The Overlooked Gap: A “State Black Box” During Long Waits
Once an AI coding assistant enters real engineering work, a typical scenario appears: the user issues an instruction, then waits tens of seconds or even minutes. During that time, the interface usually shows only a spinner or a static line of text. The user cannot tell three things: is it thinking, reading or writing files, or running commands; which step it is on; and whether it has actually finished.
The resulting behavior is repetitive: constant checking, switching away and back, and killing the task after misjudging it as stuck. This is especially pronounced in long-chain tasks such as cross-file refactoring and batch test fixing. Externalizing internal state is a direct way to ease that anxiety—and it can be handled by a “character that does no work,” one that takes no part in decisions and only expresses state.
3. Positioning: A Companion-Style Status Indicator, Not an Assistant
The design goals must be strictly bounded, or they will drift into feature bloat:
- Zero functional promises: no answering, no code changes, no use of the main conversation context.
- Three-state mapping: idle (quiet standby), running (working), done (task wrap-up).
- State comes from session events, not from guessing at output text.
- Replaceable character assets, so teams can customize.
Three states are enough because they cover the judgments users actually care about: can I interrupt, should I keep waiting, and is this round over. “Done” must be bound strictly to a normal termination event: if a turn is aborted by the user or errors out midway, the character does not enter the done state and returns directly to idle. Only then does “seeing the completion action” equal “this round really finished,” avoiding misleading signals.
4. Key Implementation Points
4.1 An Event-Driven State Machine
Do not poll and do not sample on a timer—subscribe directly to session lifecycle events. A sketch of the structure:
IDLE, RUNNING, DONE = "idle", "running", "done"def on_event(evt, st):if evt.kind == "turn_started":st.mode = RUNNINGst.tool = Noneelif evt.kind == "tool_invoked":st.mode = RUNNINGst.tool = evt.tool_name # Show the current tool to indicate progresselif evt.kind == "turn_finished":st.mode = DONEst.deadline = now() + 8 # Stay in done briefly, then fall backelif evt.kind in ("turn_aborted", "error"):st.mode = IDLE # Aborts and errors do not count as doneif st.mode == DONE and now() > st.deadline:st.mode = IDLEreturn st
Three points matter here: the done state lingers briefly (for example, a few seconds) before returning to idle automatically, so it does not occupy the visuals indefinitely; the running state carries the current tool or phase name, so users know at a glance what it is doing; and when subtasks run in parallel, the main character’s expression does not switch—it follows only the main session, preventing state flickering.
4.2 Rendering Layer and Terminal Adaptation
The same set of states must fit two carriers: a graphical interface uses bitmaps or pixel frame sequences, while a terminal environment uses techniques such as half-block characters to assemble a half-body figure. The key constraints for the terminal version are size adaptation and fallback: fix a relatively narrow width and line count (for example, thirty-odd columns and a dozen-plus rows), hide automatically when the window is too narrow, and show on the side when the window is wide enough; fall back to a plain text status line when the required characters are unsupported. Rendering must be decoupled from state—the state machine outputs only enums and text, and each platform’s adaptation layer handles the actual drawing.
4.3 Distribution and Customization
Distribute as a plugin, with one installation entry point and one enable command, and support replacing character assets and text via configuration. The documentation should provide two paths—“manual customization” and “hand the repository to an assistant for automatic modification”—to lower the barrier to secondary development.
5. Engineering and Experience Benefits
- Lower cognitive load: visible state reduces pointless checking and mistaken aborts.
- More specific signals: showing the current phase in the running state carries more information than a uniform spinner.
- Zero runtime cost: no extra requests, no quota consumption, no interference with the main flow.
- Reusable skeleton: the same state machine can attach to long-running scenarios such as build progress and pipeline stages.
6. Conclusion
The “serious tool nobody uses” and the “pet that gets forked” are not in conflict. The former solves a problem that is already covered; the latter fills an experience gap during waiting. The lesson for developers is that at a stage where features are converging, turning internal state into a lightweight external layer that is perceivable, predictable, and customizable is often more valuable than piling on another feature. To deploy this on your own platform or a cloud environment, you can collect state events with log and monitoring services and host the rendering service on a container platform, forming a general, portable implementation path.
