A Companion Widget for AI Coding Tools: Making Tool State Visible
This article explains why a purely cosmetic companion widget for AI coding tools can improve the user experience by exposing internal tool state through a minimal, three-state visual model. It covers the state machine design, dual rendering for terminal and graphical environments, plugin-based distribution, and a layered architecture that separates replaceable visuals from reusable logic. Developers will find a practical, product-agnostic approach to reducing waiting anxiety, attention switching, and result misinterpretation.
1. Starting With a Counterintuitive Observation
I have built several “serious” productivity tools with clear goals: save people time and reduce repetitive work. After release, they got little feedback. The only time a stranger copied my code and modified it was for a tiny plugin that only changed the interface background image. It solved no real problem, yet it attracted attention in a code hosting community.
This contrast is worth unpacking. It does not mean useful things have no value. It reveals a commonly overlooked fact: the experience of using a tool often depends less on how capable it is and more on whether users can sense what it is doing at any moment.
So I tried a reverse approach: build a purely companion-style widget for a commonly used AI coding tool. It takes on no real task. Its only job is to externalize the tool’s internal state into intuitive, cute feedback. The code is open source, anyone can install it, and anyone can replace the character.
2. Problem Definition: The State Black Box of AI Coding Tools
While an AI coding tool runs, it constantly switches among internal states: waiting for input, reading files, retrieving code, executing commands, generating answers, completing a task, or being interrupted or hitting an error. Most of this information scrolls as a text stream in the conversation area, so users have to watch the logs to judge progress.
This creates three typical pain points:
- Waiting anxiety: users do not know whether the tool is thinking, calling a capability, or already stuck.
- Attention overhead: to confirm progress, users are forced to return to the window repeatedly, interrupting other work.
- Result misinterpretation: users treat a mid-way error as completion and continue from a false premise.
The solution is not more logs. It is a low-information-density, high-recognizability state indicator layer. Human eyes perceive shapes and motion much faster than they parse text. A single expression change conveys information faster than three lines of status text.
3. State Model Design: Three Expressions Are Enough
The easiest way for anthropomorphic feedback to fail is over-designing states. Too many expressions are hard for users to remember and costly for developers to maintain. I kept only three states, strictly aligned with the tool lifecycle:
| State | Visual | Trigger | Meaning |
|---|---|---|---|
| Idle | Looking down at a book, with a prompt below to wait for input | Session ready, no task in progress | I can start |
| Working | Looking up, with the current capability name shown below | The tool is reading, retrieving, or executing | It is doing this step |
| Done | Holding up the book and smiling, returning to idle after about 8 seconds | The current turn ended normally | This turn really ended |
Several key design decisions:
- The done state must be exclusive. If a turn is interrupted by the user or fails midway, it does not enter the smile state and returns directly to idle. This makes the smile a trustworthy signal rather than decoration.
- Show the specific capability name while working. Instead of “processing,” show the actual action type used in the current step, so users can tell at a glance which stage progress is in.
- The done state exits automatically. It returns to idle after 8 seconds to avoid occupying visual space for too long.
- Follow only the main conversation. When the tool spawns parallel subtasks, the widget does not switch expressions, preventing the state from jumping frequently across multiple execution flows and creating distraction.
Here is product-agnostic pseudocode that expresses the core constraints of the state machine:
STATE = "idle" # idle / working / donedef on_turn_start():set_state("working", detail=current_action_name())def on_turn_end(status):if status == "ok":set_state("done", hold_seconds=8)else: # interrupted or error, no completion feedbackset_state("idle")def on_subtask_event(_):pass # subtasks do not affect the widget expression
4. Dual Rendering: Handling Differences Between Terminal and GUI
The same widget must appear in two runtime environments, so the rendering strategy must be designed separately.
On the GUI side, it can use full pixel images, switching frame by frame among idle, page-turning, and book-raising actions. Resolution is ample and animation is natural.
On the terminal side, it is limited by the character grid and needs half-block characters to draw a half-body portrait. In engineering, it is constrained to a fixed canvas of 36 columns wide and 16 rows high, with capability detection for the terminal type. When color or character rendering is unsupported, it automatically degrades to a plain text status hint to avoid a broken display caused by environment differences. When the window is wide enough (about 144 columns or more), the widget docks to the side automatically. When the window is narrow, it does not take over the main content area and degrades to a single line of status text.
This “graceful degradation” is a general principle for terminal-based interactive tools: no visual enhancement should become a prerequisite for functional usability.
5. Plugin Distribution and Installation Experience
The widget has no business logic, so it is best distributed as a plugin, ready to use after installation with no tuning or maintenance:
- No persona configuration and no parameter tuning; the default is three expressions.
- It does not interfere with the tool’s existing execution flow and only subscribes to state events.
- It provides a unified entry command to summon it, and supports installation in the GUI plugin management panel by adding a plugin source and then adding the plugin in two steps.
- It appears automatically when the window size meets the conditions, with no manual enabling.
Note that different runtime environments support plugin mechanisms to different degrees. The installation paths for terminal and GUI clients are usually different, so the documentation should explain them separately and clearly mark unsupported environments.
6. Replaceable Characters: Decoupling the Visual Layer From the Logic Layer
The most valuable part of this kind of project is not the pet itself, but the layering approach it demonstrates:
- Logic layer: state machine, event subscription, degradation strategy.
- Resource layer: pixel images or character art, animation frames, copy.
- Adapter layer: rendering and installation differences across runtime environments.
Replace only the resource layer and you can switch to any character. Keep the event contract unchanged and the logic layer is fully reusable. My practical advice for developers is to completely separate “replaceable appearance” from “non-replaceable behavior.” This reduces extension cost by an order of magnitude.
If you do not want to read the documentation, you can also hand the repository address to an AI coding tool and let it handle the integration. The code of such plugins is mostly generated by AI coding tools, while humans are mainly responsible for character design and result acceptance. This also confirms a real collaboration division today: humans define intent and aesthetic standards, while tools handle implementation and iteration.
7. Conclusion: Add a Layer of Perceptibility to Your Tool
Back to the original conclusion. Users do not reject useful tools; they reject tools they cannot perceive. Adding a lightweight, anthropomorphic, replaceable status widget to an AI coding tool costs very little and delivers clear benefits: lower waiting anxiety, fewer attention round trips, and no result misinterpretation.
To implement this in your own project, start with three steps: first, map the tool’s real set of states; second, define a minimal viable state mapping (fewer is better); third, add multi-environment degradation and plugin-based distribution. As for the character, leave it to aesthetics. It was never part of the functionality.
