Building a State Visualization Pet Plugin for AI Coding Assistants: From Idea to Open Source
This article describes the design and implementation of a desktop pet plugin that visualizes the state of an AI coding assistant. It explains why a small visual companion can stand out in a crowded developer-tool market, details a three-state machine that maps idle, working, and done states to assistant events, and covers event hooks, GUI and terminal rendering, zero-configuration defaults, open-source distribution, and the broader emotional design trend in developer tools.
A counterintuitive observation: why a plugin that does nothing got attention
Many independent developers have had this experience: a carefully polished utility plugin gets little traction, while a small side project accidentally takes off. This article starts from a real observation. In an AI coding tool ecosystem, a developer published several efficiency-focused plugins and almost nobody noticed. The only project that strangers forked and starred was a purely decorative plugin that did nothing but replace the interface background image.
The logic behind this is not difficult to see:
- Utility plugins face low switching costs and highly homogeneous competition. Users have many comparable options, so a new tool has trouble building differentiation.
- Emotional products occupy a scarce part of developers’ attention. Developers spend hours every day in front of terminals and editors, and a small visual companion supplies emotional value in a category with few competitors.
- Decorative projects are easy to share. A screenshot of something cute spreads naturally, while the value of an efficiency plugin can only be felt after actually using it.
Based on that judgment, the project deliberately chose a scope that does not add another productivity feature: a chibi-style desktop pet for an AI coding assistant. The pet is a pixel-art character holding a book. It sits next to the conversation window. It does not issue commands and does not generate code. Its only job is to use three poses to tell the user whether the assistant is now idle, working, or has just finished a turn.
Core design: a three-state machine
Three states and their meaning
The pet’s visible appearance maps directly to three states:
- IDLE: the pet stands still, holding the book. The caption below it says “Waiting for you.” This corresponds to the assistant waiting for user input.
- WORKING: the pet lowers its head and turns pages. This corresponds to the assistant after receiving a request: reasoning, calling tools, or generating a reply.
- DONE: the pet holds the book up and smiles. After about 8 seconds, it automatically returns to IDLE. This corresponds to a conversational turn ending normally.
The state machine can be expressed as minimal pseudocode:
States: { IDLE, WORKING, DONE }Transitions:IDLE --user submits request--> WORKINGWORKING --reply ends normally--> DONEWORKING --interrupted/error--> IDLEDONE --8s timer expires--> IDLE
The important edge case: what counts as “really done”
One detail is easy to miss but has a large effect on the experience: interruptions and errors must not enter DONE.
In practice, users often interrupt a long response, and network or service errors can also end a turn early. If those cases also showed the smiling pose, the pet would be lying. The user would see the “holds the book up and smiles” pose and assume the turn had been delivered completely. The design therefore requires that only a “turn ended normally” event enters DONE; interrupt and error events go directly back to IDLE. This makes the smiling pose a credible signal: when the pet smiles, the turn truly completed. That is the key step in turning a decorative element into a trusted state indicator.
More information in the WORKING state
While WORKING, the text line below the pet can show the name of the tool the assistant is currently calling—for example, reading a file, executing a command, or searching code. A quick glance tells the user which step the assistant is on. This produces a useful side effect: the originally “pure decoration” now also provides progress observability. It adds no operation cost, but it noticeably reduces uncertainty during the wait.
Concurrency: follow the main conversation only
Modern AI coding assistants often support derived subtasks, or subagents, running in parallel. If the pet changed expression for every subagent, the animation would flicker and lose readability. A reasonable tradeoff is to have the pet follow only the main conversation. State changes in subagents do not change the pet’s expression. This follows the principle of signal over noise: a state indicator is valuable when it gives a stable, interpretable overview, not when it renders every event as a separate animation.
Technical implementation
Hooking into assistant events
To implement the state machine, the plugin needs to subscribe to the event stream of the assistant runtime. Common AI coding tools provide plugin or hook mechanisms. The events needed are typically:
- User message submitted (turn start)
- Tool call started/finished (used to update the caption in WORKING)
- Assistant reply complete (normal turn end)
- Turn interrupted or error
The plugin switches to WORKING at turn start, listens for tool-call events to refresh the caption, enters DONE on reply complete and starts the 8-second fallback timer, and returns to IDLE on interrupt or error while canceling the timer. The overall logic can be implemented in fewer than 100 lines. The complexity is concentrated in event-subscription compatibility.
Two rendering environments
The pet needs to appear in two kinds of surfaces, and the rendering approaches differ greatly.
- GUI (desktop client): render the complete pixel-art character directly. A lightweight animation frame sequence or procedural drawing is suitable. The main constraints are controlling asset size and keeping the frame rate stable without hurting the rendering performance of the main interface.
- Terminal: no graphics, so the character must be composed from text characters. Unicode half-block characters are useful because each character represents an upper and lower pixel, effectively doubling vertical resolution. A half-body image roughly 36 columns wide and 16 rows high can be quite recognizable. Terminal rendering also needs to:
- Avoid depending on true color or terminal-specific font features so that it works in mainstream terminal emulators.
- Adapt to window width. When the terminal is wide enough—for example, 144 columns or more—the pet can appear automatically in the sidebar area. When the window is narrow, it should not squeeze the main conversation; the user can summon it with a command.
Zero configuration
This plugin deliberately works out of the box. There is no feeding mechanic, no persona setup, and no settings page. The three expressions are the entire feature set. That tradeoff is worth calling out: configuration items are an antipattern for emotional products. Any learning cost the user pays erodes the delight that makes the pet appealing. The correct form is: install, summon, and it is there.
Using AI to build the AI assistant’s pet
A practical detail: most of the plugin code was generated by the AI coding assistant itself. The human developer was responsible for the visual design and final acceptance. This validates an increasingly common workflow—the human defines what should be built and whether the result is good, while the AI handles how to build it. For a small plugin with clear logic and well-defined boundaries, AI-assisted development is especially efficient. State machines, event subscription, and character rendering are mature patterns. Human review can focus on edge behavior, such as whether the state falls back correctly after an interruption.
Distribution and derivative works
The plugin is distributed through a plugin marketplace mechanism. A user adds the repository as a source, installs it with one click, and summons the pet with a slash command. The project is published as open source, and the repository includes full documentation.
Open source brings two additional benefits:
- Replaceable character. To switch to a custom character, replace the asset files. The state machine and rendering logic stay unchanged. This lowers the barrier for derivative works and is one reason such projects attract community attention: every user can become a remixer.
- Learnable implementation. For developers who want to understand how to write plugins for AI coding tools, this project is a small but complete example. Event subscription, state machine, dual-environment rendering, and plugin packaging can all be seen in one repository.
Going further, if a user does not want to read the documentation, they can hand the repository address to their own AI coding assistant and ask it to read the code and help with customization. Letting the tool consume its own usage instructions is a small example of the AI-native development style.
From a desktop pet to emotional design in developer tools
This seemingly “useless” project points to a direction worth paying attention to: as developers spend more time with AI tools, emotional design will become a real differentiator.
A state visualization pet does not take on a production role, but it addresses two hidden pain points. One is the anxiety of asynchronous waiting: “is it still working, or is it stuck?” The other is the loneliness of long human-computer interaction. The first is solved by a credible three-state signal; the second, by a sense of companionship. It is reasonable to expect more low-cost, high-emotional-value auxiliary elements in AI coding tools, cloud development environments, and even internal enterprise R&D platforms.
For developers, the implication is twofold. On one hand, the threshold for building small tools has dropped sharply because of AI; turning an idea into a usable open source project can take a few days. On the other hand, when choosing what to build, it may be better to consider “does nothing but makes people happy” niche needs rather than compete in an already crowded efficiency track. That is where more genuine user responses often appear.
