← All versions
v0.4.0

Telegram bot QA round

What's new

Telegram bot — fast paths

  • Regex extractors for obvious commands: "slept 7 hours", "weight 75", "8000 steps", "mood 7". Bypass LLM entirely, save AI quota, fire in <100ms.
  • Journal pre-route: "Записать в дневник: ...", "Dear diary", "End of day" — instant write without brain LLM.
  • Brain Undo button — after a voice message that creates tasks/notes/events, an "↶ Undo" button appears (5-minute TTL).

DB

  • health_entries.value migrated from INTEGER to REAL — decimal support (sleep 7.5h, weight 75.3kg).

Fixed

  • HMR double-registration of Telegraf handlers — root cause of duplicated tasks. Each dev hot-reload was appending another full set of bot.on('message', ...) subscriptions on top of the old ones. Fixed via globalThis singleton (same pattern as the DB client).
  • /start greeting: linked users now get "Welcome back, Pavel!" instead of "link your account" instructions.
  • /help: dropped dead commands /morning and /ask (never registered).
  • Health prompt in stt-service: stronger few-shot examples + hard rule "keyword + number → ALWAYS log_metric, never unknown".
  • Brain prompt in stt-service: anti-context-leak rules — context is an RO snapshot, not an actions source. No more "Lose 2kg" / "Work at Yandex" zombies from user memory.