Files
hikari-desktop/src/lib/utils/agentCharacters.ts
T
hikari d8cf5504d6
CI / Build Linux (push) Has been cancelled
CI / Lint & Test (push) Has been cancelled
CI / Build Windows (cross-compile) (push) Has been cancelled
Security Scan and Upload / Security & DefectDojo Upload (push) Has been cancelled
feat: agent monitor characters, cast panel, WSL fixes, and Sonnet 4.6 (#149)
## Summary

### New Features
- **Claude Sonnet 4.6 support** — added `claude-sonnet-4-6` as a selectable model in the config sidebar
- **Anime girl characters for subagents** — each subagent in the agent monitor is automatically assigned one of six characters (Amari, Keiko, Minori, Reina, Tatsumi, Yumiko) with a unique name, CDN avatar, title, and lore-flavoured description; assignment avoids duplicates when possible
- **"Meet the Team" cast panel** — a new modal accessible from the status bar introduces the full cast: Naomi (Chief hEx-ecutive Officer), Hikari (Chief Operating Officer), and the six subagent girls with their C-suite titles and character bios

### Bug Fixes
- **"Already running" error on invalid working directory** — if a spawned Claude process exits unexpectedly (e.g. because the working directory doesn't exist), `try_wait()` now detects the stale handle and clears it before allowing a restart
- **Working directory pre-validation** — on Windows, the app now runs `wsl -e test -d <dir>` before launching Claude; invalid directories surface a clear error immediately
- **WSL binary detection** — on Windows, `wsl -e bash -lc "which claude"` is used to probe for the Claude binary inside WSL; on Linux/WSLg, `bash -lc "which claude"` is used as a login-shell fallback so GUI apps find the binary even without shell PATH
- **WSL detection fix for production builds** — `detect_wsl()` now short-circuits at compile time on Windows targets, preventing inherited `WSL_DISTRO_NAME` env vars from misrouting native Windows binaries through the Linux code path

 This PR was crafted with love by Hikari~ 🌸

Reviewed-on: #149
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-02-23 21:36:09 -08:00

62 lines
2.0 KiB
TypeScript

export interface AgentCharacter {
name: string;
avatar: string;
title: string;
description: string;
}
export const CHARACTER_POOL: readonly AgentCharacter[] = [
{
name: "Amari",
avatar: "https://cdn.nhcarrigan.com/amari.png",
title: "Executive Assistant",
description:
"Fey-blooded PA and healer of the team. She always knows when you need a break — and makes sure you take one.",
},
{
name: "Keiko",
avatar: "https://cdn.nhcarrigan.com/keiko.png",
title: "Chief Security Officer",
description:
"Bodyguard and shadow of the family. Conceals blades beneath evening gowns; always watching from the dark.",
},
{
name: "Minori",
avatar: "https://cdn.nhcarrigan.com/minori.png",
title: "Chief Compliance Officer",
description:
"An ancient Automaton built to guard the Great Library. Perfect memory, perfect logic, perfect dedication.",
},
{
name: "Reina",
avatar: "https://cdn.nhcarrigan.com/reina.png",
title: "Chief Legal Officer",
description:
"Demon of the Crossroads turned corporate lawyer. Her binding contracts have held for millennia.",
},
{
name: "Tatsumi",
avatar: "https://cdn.nhcarrigan.com/tatsumi.png",
title: "Chief Design Officer",
description:
"A Siren who traded the ocean for a stylus. Uses her glamour to make every interface welcoming and beautiful.",
},
{
name: "Yumiko",
avatar: "https://cdn.nhcarrigan.com/yumiko.png",
title: "Chief Technology Officer",
description:
"Technomancer and machine whisperer. She communes with machine spirits and keeps the digital world running.",
},
];
/**
* Picks a character for a new subagent.
* Avoids names already assigned to active agents unless all six are taken.
*/
export function assignCharacter(activeNames: readonly string[]): AgentCharacter {
const available = CHARACTER_POOL.filter((c) => !activeNames.includes(c.name));
const pool = available.length > 0 ? available : [...CHARACTER_POOL];
return pool[Math.floor(Math.random() * pool.length)];
}