Building a Desktop Pet for AI Coding Tools: Turning Runtime Status into Visual Signals
This article examines why emotional and perceptible features often gain more traction than utility-focused plugins for AI coding tools, using a desktop-pet companion component as a case study. It explains how the component maps tool states (idle, running, done) to character expressions, defines state-machine edge cases to keep status signals unambiguous, and compares two rendering approaches: a graphical pixel-art mode and a terminal mode using half-block characters. It also covers installation channels, replaceable assets for secondary development, and reusable lessons on perceptible differentiation, single-meaning signals, and low installation friction.
Building a Desktop Pet for AI Coding Tools
1. A Counterintuitive Observation: The More Serious the Tool, the Less Anyone Cares
Over the past two years, most auxiliary plugins built around AI coding tools have followed the same logic: make the tool better at getting work done. Faster completion, more accurate refactoring, more detailed reviews. Such projects often launch quietly, and the reason is not complicated—they solve problems that already exist, and when users cannot perceive a difference, they have no motivation to spread the word.
One exception was a background-image plugin built for the runtime framework of a certain AI coding tool. It carries no business logic and does only one thing: replace the interface background. As a result, it earned stars on a code hosting community and was forked by a stranger for the first time (a fork means someone copies the code and modifies it independently). This signal deserves serious attention: when tools become highly homogeneous, emotional value and perceptibility are becoming key variables in whether a plugin gets accepted.
That leads to the subject of this article: a desktop-pet-style companion component attached to an AI coding tool. It does not participate in code generation and takes over no tasks. It does only two things—look appealing, and make it obvious at a glance what the tool is doing right now.
2. Core Design: Translating “Runtime Status” into “Expressions”
All of the component’s information is concentrated in three states, expressed through differences in the character’s posture:
| Tool State | Character Behavior | Supporting Text |
|---|---|---|
| Idle | Holding a book, motionless | Waiting for your input |
| Running | Head down, flipping through the book | Name of the tool currently being called |
| Done | Holding the book up, smiling | None |
The value of this mapping is that it compresses states originally hidden in logs and scrolling output into a signal that requires no reading. The text shown while running is especially important: it directly displays the capability category being used in the current step (reading files, searching, executing commands, and so on), so users can tell at a glance whether the task is stuck on retrieval or on verification, without digging through terminal history.
The boundary conditions of the state machine must also be clearly defined; otherwise, the “done” signal becomes distorted:
- Only a successful finish raises the book and smiles, then falls back to idle after 8 seconds;
- If a turn is interrupted by the user or an execution error occurs, it does not enter the smiling state and returns directly to idle;
- When the main conversation dispatches subtasks, the expression does not switch; it only follows the state of the main conversation.
The third rule is often overlooked, but it is the core of preventing state flickering: if every subtask drives an expression switch, the interface will repeatedly jump within a few hundred milliseconds, completely losing its indicative meaning. The statement “only a smile means this round is truly finished” holds precisely because the three constraints above jointly guarantee the signal is single-meaning.
3. Rendering Approach: One Set of States, Two Presentation Forms
Cross-environment display is the biggest engineering challenge for this kind of component. Two forms have been validated in practice:
- Graphical interface mode: presents a full-body image in pixel art, with free resolution and no limit on animation frames;
- Terminal mode: assembles a half-body image using half-block characters (upper and lower half-region characters), fixed at 36 columns wide and 16 rows high.
The key to the terminal approach is that it “does not picky about terminals.” Half-block characters belong to a widely supported Unicode block, and combined with foreground/background color inversion, they can draw two pixels (top and bottom) within a single character cell. Therefore, no true-color support and no graphics protocol are required, and stable output is possible in most shells and terminal emulators. The fixed width and height are another pragmatic tradeoff: it does not rely on terminal size negotiation, avoiding layout breakage caused by window resizing; when the window is wide enough (144 columns or more), the character is automatically placed in a sidebar position.
To reproduce this in your own project, the rendering layer can be abstracted into the following interface, with the graphical backend and the character backend each implementing it, while the state machine depends only on the abstraction:
class PetRenderer:def set_state(self, state: str, detail: str = "") -> None:"""state: idle | working | done"""raise NotImplementedErrorclass CharRenderer(PetRenderer):WIDTH, HEIGHT = 36, 16def set_state(self, state, detail=""):# Select the character-art frame based on state; render detail as bottom text...
4. Distribution and Installation: Lowering the Barrier to “First Use”
No matter how good a component is, it loses users if the installation path exceeds three steps. A better approach is to provide two channels at the same time:
- Command-line channel: enter the plugin installation command within a session, specifying the plugin name and the source repository identifier;
- Graphical interface channel: click the “+” next to the input box to enter the plugin panel, first add the source repository, then add the specific plugin.
After installation, the character is invoked through an explicit command; if the window is wide enough, it appears automatically in the sidebar. This combination of “explicit invocation + automatic residency” both lets users confirm the installation succeeded and avoids occupying interface space without consent.
It should be noted that the capability boundaries of the two channels are not identical—the command-line installation method is usually unavailable in graphical clients, so the documentation must clearly state the applicable scope rather than vaguely claiming “one-click installation is supported.”
5. Replaceability and Secondary Development
The character’s image assets and state definitions should be decoupled: replacing a set of assets is enough to switch to a custom character, with no changes to the state machine. At the documentation level, it is at least necessary to explain asset specifications (canvas size, frame count, state naming conventions) and debugging methods.
A collaboration model worth borrowing is this: the code is generated by the AI coding tool, and the developer is only responsible for character design and result acceptance. This also points to a currently feasible division of labor—leave repetitive implementation to the tool, and keep aesthetic judgment and boundary definition for humans. For readers, the most effortless way to get started may not even be reading the documentation, but handing the repository address to a coding assistant and letting it complete the installation and customization according to requirements.
6. Reusable Conclusions
The real inspiration of this case is not “building a pet,” but three transferable judgments:
- Perceptibility first: when underlying capabilities converge, differences that can be seen at a glance are more easily accepted and spread;
- Signals must be single-meaning: status indicators are credible only after boundary cases are strictly defined;
- Installation cost determines survival: one more distribution channel means one more batch of people willing to try.
To implement a similar component on your own toolchain, start with the smallest closed loop: define three or four states, implement one rendering backend, and provide one installation path, then gradually add cross-environment adaptation and character replacement capabilities. If you need to carry user-defined assets or report states, you can use object storage to distribute assets, a message queue to transmit state events, and logging services with monitoring alerts to observe anomalies—all using industry-standard capabilities, with no need to bind to a specific vendor’s solution.
