feat: highlight wake phrases in magenta (startup banner + wake note)

add a magenta color; paint wake phrases magenta in the startup 'wake:' list and in
the loose-match '(wake: <phrase>)' note (the rest of that green heard line stays
green around the magenta phrase). makes the wake vocabulary visually distinct from
green heard-text and brightblue command words.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
disqualifier 2026-06-26 04:02:15 -04:00
parent 97591eb24d
commit 252385fb67
2 changed files with 12 additions and 7 deletions

View File

@ -20,6 +20,7 @@ _COLORS = {
"cyan": "\033[36m",
"blue": "\033[34m",
"brightblue": "\033[94m",
"magenta": "\033[35m",
"dim": "\033[2m",
"bold": "\033[1m",
}

View File

@ -175,13 +175,16 @@ class Daemon:
action = parsed.action
# a command was recognized — echo what we heard (green) before acting. note the
# matched wake phrase when the transcript didn't literally contain it (so a
# loose match like "okay clouds" -> "okay claude" is visible).
wake_note = ""
# matched wake phrase (magenta) when the transcript didn't literally contain it
# (so a loose match like "okay clouds" -> "okay claude" is visible).
head = self._console.paint(f'heard "{transcript}" -> {self._describe(action)}', "green")
note = ""
if parsed.wake and parsed.wake.replace(" ", "") not in transcript.lower().replace(" ", ""):
wake_note = f" (wake: {parsed.wake})"
self._console.emit(VOICE, f'heard "{transcript}" -> {self._describe(action)}'
f'{wake_note} {self._timing()}', "green")
note = (self._console.paint(" (wake: ", "green")
+ self._console.paint(parsed.wake, "magenta")
+ self._console.paint(")", "green"))
tail = self._console.paint(f" {self._timing()}", "green")
self._console.emit(VOICE, f"{head}{note}{tail}")
def blue(s):
return self._console.paint(s, "brightblue")
@ -302,7 +305,8 @@ class Daemon:
self._console.emit(SYSTEM, f"claudedo {self.mode} mode — Ctrl-C to stop", "bold")
self._console.emit(SYSTEM, f"model {cfg.stt_model} ({cfg.stt_language}) · mic {dev} · "
f"target {target_now}")
self._console.emit(SYSTEM, "wake: " + ", ".join(cfg.wake_phrases))
wakes = ", ".join(self._console.paint(p, "magenta") for p in cfg.wake_phrases)
self._console.emit(SYSTEM, f"wake: {wakes}")
def _refresh_state(self) -> None:
write_state(os.getpid(), self.mode, target.read_active())