Building a "Pet" Interface for Your AI Coding Assistant

    This article explores how a non-functional companion UI—a small chibi character holding a book beside an AI coding assistant's chat area—can improve process visibility rather than replace productivity tools. It covers designing around states instead of features (idle, executing, done, and error), sourcing state through event-driven updates instead of polling, and keeping animation and copy minimal. The key takeaway is that treating UI feedback as a reliable protocol helps users confirm when a turn truly finishes, making state modeling and exception handling more valuable than adding more capabilities.

    1. Why “Productive” Tools Get Ignored

    A counterintuitive pattern often shows up in developer tooling: plugins that emphasize “boosting efficiency” and “automating work” struggle to get attention, while tiny widgets with almost no real function get bookmarked, shared, and even forked. The reason is simple. The payoff of an efficiency tool only becomes visible after users build a habit around it, whereas a cute companion widget delivers its value the moment it opens.

    This article is about one such “non-working” project: a chibi character standing next to the AI coding assistant’s conversation area, holding a book. When the user sends a message, she looks down and flips through the book; when the assistant finishes its output, she raises the book and smiles; when idle, she holds the book with a line underneath that says “Waiting for you to speak.” It does not generate any code or run any commands. It only does two things: provide emotional value and visualize the assistant’s current phase.

    The point here is not to replace productivity tools, but to fill a long-overlooked gap: process visibility. Most AI coding assistants only show the final result, leaving users without feedback while they wait, which leads to repeated refreshes or duplicate submissions. A lightweight status indicator fills exactly that gap.

    2. Design Goal: Make “State,” Not “Function,” the Core

    To build a solid companion component, the key is to drop feature ambitions and model states accurately. It helps to define three base states and one end state:

    • Idle: no active session; show the book-holding pose and hint text.
    • Executing: the assistant is processing; show the page-flipping motion and display the name of the tool currently being called.
    • Done: the turn ended normally; show the raised-book smile, then fall back to idle after a few seconds.
    • Error: the turn was interrupted or execution failed; skip the smile and return directly to idle.

    What makes this design work is that the done state carries the meaning of a “trustworthy signal.” Users do not need to read long output—seeing the smile is enough to confirm the turn actually finished. Conversely, if a turn is interrupted midway, the interface will not show a misleading hint of success. This treats UI feedback as a protocol to design against, not just decoration.

    3. State Source: Event-Driven Instead of Polling

    The reliability of the companion component depends on how accurate its state source is. There are two common approaches: polling the session API, or subscribing to an event stream. The former is simple to implement but adds latency and extra request overhead; the latter offers better real-time behavior and is the recommended option.

    The idea is to instrument the key points in the session lifecycle and broadcast standardized events outward; the component only consumes events and stays unaware of business details.

    1. // Event definitions (illustrative)
    2. const PHASE = {
    3. IDLE: 'idle',
    4. THINKING: 'thinking',
    5. TOOL: 'tool',
    6. DONE: 'done',
    7. ERROR: 'error',
    8. };
    9. // Session-side broadcast
    10. function emit(event, payload) {
    11. bus.publish('assistant:phase', { event, payload, ts: Date.now() });
    12. }
    13. // Component-side consumption
    14. bus.subscribe('assistant:phase', ({ event, payload }) => {
    15. switch (event) {
    16. case PHASE.TOOL:
    17. render('thinking', payload.toolName); // show the tool in use
    18. break;
    19. case PHASE.DONE:
    20. render('done');
    21. setTimeout(() => render('idle'), 8000);
    22. break;
    23. case PHASE.ERROR:
    24. render('idle');
    25. break;
    26. default:
    27. render(event);
    28. }
    29. });

    Three engineering points matter here. First, events should carry a monotonically increasing turn identifier so a late event cannot overwrite a newer state. Second, the fallback from the done state needs timer cleanup to prevent rendering from firing after the component unmounts. Third, the error path must be modeled explicitly, just like the normal path; otherwise the UI looks stuck “flipping pages” and appears frozen.

    4. UI and Animation: Cheap to Make Cute, Expensive to Keep Restrained

    The visual implementation does not need to be complex. A sprite sheet or a few frame sequences, combined with CSS transforms, is enough for the two motions of flipping and raising the book. What matters is timing: keep each motion to a few hundred milliseconds so it does not steal attention, and let the done state linger for about 8 seconds—long enough for users to notice, without holding visual focus for too long.

    Copy is part of the state too. A short line like “Waiting for you to speak” tells users what the component is for better than any feature description. Avoid piling keyboard shortcut hints or parameter explanations onto the pet; that would turn it back into a reskinned tool panel.

    5. Extensibility: From Single-User Companion to Team Observability

    To take this idea into a team setting, you can wire the state events into a unified logging, monitoring, and alerting system: collect per-turn latency, tool-call distribution, and interruption rate as common metrics, then archive animation assets and versions on a container platform or object storage. This way, a “non-working” component can also become a lightweight observability entry point. The general cloud product categories offered by Baidu AI Cloud are enough to support this kind of collection, storage, and display.

    6. Conclusion

    What is really worth borrowing from this case is not the pet image itself, but the product judgment it reveals: when functional innovation is hard to perceive, lowering the barrier and improving visibility is often more effective than stacking on more capabilities. Model the states clearly, connect the event pipeline, and cover the exception paths—and even a UI element that takes part in no computation can become a reason for users to look at it one more time each day.