Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/build-art.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@

import { readFileSync, writeFileSync } from "fs";
import { join } from "path";
import { fileURLToPath } from "url";
import { ANIMAL_ART } from "../server/art.ts";
import { ANIMALS, ANIMAL_COLOR } from "../server/engine.ts";
import { ART_META } from "../server/art-meta.ts";
import type { AnimalId } from "../server/engine.ts";

// Resolve paths relative to this script's directory
const SCRIPT_DIR = new URL(".", import.meta.url).pathname;
const SCRIPT_DIR = fileURLToPath(new URL(".", import.meta.url));
const PROJECT_ROOT = join(SCRIPT_DIR, "..");
const SHELL_PATH = join(PROJECT_ROOT, "statusline", "pet-status.sh");

Expand Down
18 changes: 9 additions & 9 deletions server/art.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ export const ANIMAL_ART: Record<AnimalId, string[][]> = {
[" ", " {*|_W_|*} ", " ( > < ) ", " { = ^ = } ", " * *~~* * "], // glare
[" ", " {*|_W_|*} ", " ( - - ) ", " { = O = } ", " * *~~* * "], // yawn
],
// 12. ESFJ golden retriever — fluffy fur ~~, tongue U, tail wag
// 12. ESFJ golden retriever — 6-eyes brow, snout, quote paws
golden: [
[" ", " _/~\\~~ ", " ( \u2022 \\~~ ", " U | ", " \\__(__)~ "],
[" ", " _/~\\~~ ", " ( \u2022 \\~~ ", " U | ", " \\__(__)~~ "],
[" ", " _/~\\~~ ", " ( - \\~~ ", " U | ", " \\__(__)~ "],
[" ", " _/~\\~~ ", " ( \u2022 \\~~ ", " U | ", " \\__(__)~~~"], // wag
[" ", " _/~\\~~ ", " ( \u2022 \\~~ ", " U | ", " ~\\__( )~ "], // jump
[" ", " _/~\\~~ ", " ( \u2022 \\~~ ", " U | ", " \\__(__)~ "], // lick out
[" ", " _/~\\~~ ", " ( \u2022 \\~~ ", " U | ", " \\__(__)~ "], // lick back
[" ", " ~~/ ~\\_ ", " (~~ \u2022 ) ", " | U ", " ~(__)__/~ "], // spin
[" ", " . \" . ", " /|6 6|\\ ", "{/(_0_)\\} ", " \" \" \" "], // idle
[" ", " . \" . ", " /|6 6|\\ ", "{/(_0_)\\} ", " \" \" \"~ "], // wag 1
[" ", " . \" . ", " /|- -|\\ ", "{/(_0_)\\} ", " \" \" \" "], // blink
[" ", " . \" . ", " /|6 6|\\ ", "{/(_0_)\\} ", " \" \" \"~~ "], // wag 2
[" ", " . \" . ", " /|^ ^|\\ ", "{/(_0_)\\} ", " ~ ~ ~ "], // jump
[" ", " . \" . ", " /|6 6|\\ ", "{/(-U-)\\} ", " \" \" \" "], // lick out
[" ", " . \" . ", " /|6 6|\\ ", "{/(~~~)\\} ", " \" \" \" "], // lick back
[" ", " . \" . ", " /|6 6|\\ ", " {/(_0_)\\} ", " \" \" \" "], // spin
],
// 13. ISTP cat — iconic /\_/\ ears, curled up loaf, aloof
cat: [
Expand Down
10 changes: 7 additions & 3 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,13 @@ server.tool(
saveReaction(reaction, "pet");
writeStatusState(pet, reaction);

return {
content: [{ type: "text", text: `${pet.petName}: ${reaction}` }],
};
const card = renderPetCard(
pet.petId,
pet.petName,
`${animalName(pet.petId)} · ${pet.personality}`,
reaction,
);
return { content: [{ type: "text", text: codeFence(card) }] };
},
);

Expand Down
16 changes: 8 additions & 8 deletions statusline/pet-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -681,14 +681,14 @@ case "$PET_ID" in
golden)
TG=$'\033[38;2;240;140;150m' # pink tongue
case $FRAME in
0) L1=" _/~\\~~ "; L2=" ( • \\~~ "; L3=" ${TG}U${C} | "; L4=" \\__(__)~ " ;;
1) L1=" _/~\\~~ "; L2=" ( • \\~~ "; L3=" ${TG}U${C} | "; L4=" \\__(__)~~ " ;;
2) L1=" _/~\\~~ "; L2=" ( - \\~~ "; L3=" ${TG}U${C} | "; L4=" \\__(__)~ " ;;
3) L1=" _/~\\~~ "; L2=" ( • \\~~ "; L3=" ${TG}U${C} | "; L4=" \\__(__)~~~" ;;
4) L1=" _/~\\~~ "; L2=" ( • \\~~ "; L3=" ${TG}U${C} | "; L4=" ~\\__( )~ " ;;
5) L1=" _/~\\~~ "; L2=" ( • \\~~ "; L3=" ${TG}U${C} | "; L4=" \\__(__)~ " ;;
6) L1=" _/~\\~~ "; L2=" ( • \\~~ "; L3=" ${TG}U${C} | "; L4=" \\__(__)~ " ;;
7) L1=" ~~/ ~\\_ "; L2=" (~~ • ) "; L3=" | ${TG}U${C} "; L4=" ~(__)__/~ " ;;
0) L1=" . \" . "; L2=" /|6 6|\\ "; L3="{/(_0_)\\} "; L4=" \" \" \" " ;;
1) L1=" . \" . "; L2=" /|6 6|\\ "; L3="{/(_0_)\\} "; L4=" \" \" \"~ " ;;
2) L1=" . \" . "; L2=" /|- -|\\ "; L3="{/(_0_)\\} "; L4=" \" \" \" " ;;
3) L1=" . \" . "; L2=" /|6 6|\\ "; L3="{/(_0_)\\} "; L4=" \" \" \"~~ " ;;
4) L1=" . \" . "; L2=" /|^ ^|\\ "; L3="{/(_0_)\\} "; L4=" ~ ~ ~ " ;;
5) L1=" . \" . "; L2=" /|6 6|\\ "; L3="{/(-${TG}U${C}-)\\} "; L4=" \" \" \" " ;;
6) L1=" . \" . "; L2=" /|6 6|\\ "; L3="{/(~~~)\\} "; L4=" \" \" \" " ;;
7) L1=" . \" . "; L2=" /|6 6|\\ "; L3=" {/(_0_)\\} "; L4=" \" \" \" " ;;
Comment on lines +690 to +691
esac ;;
cat)
case $FRAME in
Expand Down
Loading