Building a "Pet" Plugin for AI Coding Tools

    This article explores why a deliberately "useless" companion plugin can be more popular than conventional productivity tools for AI coding assistants. It presents a reusable technical approach that maps a three-state machine to the session lifecycle, replaces vague "thinking" indicators with tool-call information, uses a single book-raising smile as the only success signal, and adapts rendering between ASCII art in terminals and pixel art on desktop. It also covers state definitions, rendering size constraints, error and interruption handling, subtask isolation, installation and distribution, and how to let an AI coding tool perform the repository-based conversion, giving readers a product-agnostic design pattern they can apply to their own plugins, internal tools, or Baidu AI Cloud interaction layers.

    A small Q-style character holding a book sits beside the conversation. When you send a message, she looks down and flips through the book; when the answer finishes, she raises the book and smiles; when idle, the line below reads “Waiting for you to speak.” She helps with nothing, yet she makes it obvious at a glance what the coding assistant is doing right now. Why is this seemingly useless plugin more popular than serious productivity tools? The answer lies not in a feature list but in immediate, readable status feedback and emotional interaction.

    Starting from a real practice, this article abstracts the “pet” into a reusable technical solution: a three-state machine that maps the session lifecycle, tool-call information that replaces the vague “thinking,” a book-raising smile as the only success-completion signal, and ASCII art and pixel art that adapt to terminal and desktop environments respectively. The article also provides state definitions, rendering size constraints, error and interruption handling, subtask isolation, the installation and distribution flow, and how to hand the repository documentation to an AI coding tool to complete the conversion automatically. Readers will get a product-agnostic design paradigm that can be migrated directly to their own plugins, internal tools, or the interaction layer of Baidu AI Cloud related applications.

    Why a “Useless” Pet Works

    The pet does not answer questions, write code, or speed anything up. Its entire job is to show, in a glance, what the assistant is doing. That constraint is the point. Immediate, readable status feedback and emotional interaction turn an opaque wait into something a user can read and feel, which is why this kind of plugin often lands better than a serious efficiency tool.

    The Three-State Machine

    The whole interaction is driven by a three-state machine that maps the session lifecycle:

    • Sending: the user has just sent a message, and the character looks down and flips through the book.
    • Completed: the answer has finished, and the character raises the book and smiles.
    • Idle: nothing is happening, and the line below reads “Waiting for you to speak.”

    The book-raising smile is the only success-completion signal. There is no second animation, no extra badge, and no additional text competing with it.

    Replacing “Thinking” with Tool-Call Information

    Instead of a vague “thinking” label, the pet surfaces tool-call information. The user can see what the assistant is actually doing rather than reading a generic spinner, which is what makes the status both immediate and readable.

    Rendering: ASCII Art and Pixel Art

    The same pet is rendered in two forms so it fits the environment:

    • ASCII art for the terminal.
    • Pixel art for the desktop.

    Rendering size constraints apply in both cases so the character stays beside the conversation without breaking the layout.

    Error and Interruption Handling

    The design accounts for errors and interruptions rather than assuming every session completes cleanly. When something goes wrong or the session is interrupted, the pet must not stay stuck in the completed state or keep showing the success signal.

    Subtask Isolation

    Subtasks are isolated so that a nested or background task does not corrupt the main session’s state. Each task keeps its own state, and the pet reflects the main conversation rather than leaking a subtask’s progress into it.

    Installation and Distribution

    The plugin is installed and distributed through a standard flow, so users can add the pet to their environment and receive updates without manual patching.

    Letting the AI Coding Tool Do the Conversion

    Finally, the repository documentation can be handed to an AI coding tool to complete the conversion automatically. Rather than rewriting the integration by hand, you point the tool at the repository description and let it perform the changes, which is how the pet was adapted in the original practice.