Skip to content

feat: desktop pet plugin (/pet) -- an animated terminal dog#473

Open
piercebrookins wants to merge 1 commit into
mpfaffenberger:mainfrom
piercebrookins:feat/desktop-pet-plugin
Open

feat: desktop pet plugin (/pet) -- an animated terminal dog#473
piercebrookins wants to merge 1 commit into
mpfaffenberger:mainfrom
piercebrookins:feat/desktop-pet-plugin

Conversation

@piercebrookins

Copy link
Copy Markdown

What

Adds a desktop pet plugin: a tiny ASCII dog that lounges in the
bottom-right of your prompt, animates (blink + wag), and rotates fun quips
while you think. It reflects the model you've set and steps aside while the
agent works.

                    (.v.) Marshmallow  *****  | "i guarded main from a force-push" - gpt-4o

Commands

Command Description
/pet on Adoption picker (like /model), then summon your dog
/pet off Hide the pet
/pet pick Re-open the picker to swap breeds
/pet <breed> Adopt a breed directly (e.g. /pet shiba)
/pet rename <name> Rename your pup
/pet quip Reroll the quip
/pet list / grid Rarity-colored one-liner list of all 19 breeds
/pet Status

19 breeds across 5 rarities (common -> legendary, gray -> gold).

How it's wired (no core edits)

Follows the AGENTS.md golden rule -- it's a self-contained plugin under
code_puppy/plugins/pet/, modeled on prompt_newline:

  • startup -- subclasses the PromptSession used by the main input prompt
    so the pet rides along as an animated bottom_toolbar. prompt_toolkit
    renders/refreshes it itself, so it never fights the REPL or smears escape
    codes (an earlier background-thread approach did exactly that -- this is the
    fix).
  • custom_command / custom_command_help -- the /pet command + help.

State (enabled / species / name) persists in puppy.cfg via the generic
config API. Styled to match the prompt palette (bright cyan / blue / green).

Notes

  • Zero LLM tokens -- quips are a static list; all rendering is local.
  • Fails gracefully -- a rendering hiccup never breaks the prompt.
  • ruff check + ruff format clean. No command_line/ edits, no core diffs.
  • Every file is well under the 600-line cap.

Adopt a tiny ASCII dog that lives in the bottom-right of your prompt as an
animated prompt_toolkit bottom_toolbar, rotating fun quips. 19 breeds across
5 rarities, an adoption picker (like /model), and a rarity-colored /pet grid.

Fully plugin-based per AGENTS.md: hooks startup (toolbar), custom_command and
custom_command_help (/pet). No core edits. State persists in puppy.cfg.
Local-only rendering -- zero LLM tokens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant