From 252385fb67180d24cd41d2bc094b30a8770ce283 Mon Sep 17 00:00:00 2001 From: disqualifier Date: Fri, 26 Jun 2026 04:02:15 -0400 Subject: [PATCH] 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: )' 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 --- src/claudedo/console.py | 1 + src/claudedo/daemon.py | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/claudedo/console.py b/src/claudedo/console.py index fba3788..39d62c5 100644 --- a/src/claudedo/console.py +++ b/src/claudedo/console.py @@ -20,6 +20,7 @@ _COLORS = { "cyan": "\033[36m", "blue": "\033[34m", "brightblue": "\033[94m", + "magenta": "\033[35m", "dim": "\033[2m", "bold": "\033[1m", } diff --git a/src/claudedo/daemon.py b/src/claudedo/daemon.py index 9683142..10149b8 100644 --- a/src/claudedo/daemon.py +++ b/src/claudedo/daemon.py @@ -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())