feat: personality pack — Python parity
Some checks are pending
Python CI / pytest (ubuntu-latest) (push) Waiting to run
Python CI / pytest (windows-latest) (push) Waiting to run
Python CI / ruff (push) Waiting to run

Python parity for the 5 personality voice commands shipped on the
Rust side:

- New `personality_handlers.py` (~150 lines): do_personality_{greet,
  thanks, compliment, how_are_you, tony_quote}. Each picks one of
  7-10 phrases per language (RU/EN) at random; greet additionally
  buckets by time-of-day (morning/midday/evening/night).
- `extensions.py`: imports + 5 proxy `do_personality_*` functions
  pointing at the new module, plus set_speak wiring so handlers can
  TTS via the runtime's voice.
- `main.py`: 5 new dispatch elifs feeding the new action types.
- `commands.yaml`: 5 new entries (`personality_*`) mapping voice
  phrases to action types.
- `tests/test_personality_handlers.py`: 6 unit tests confirming
  each handler returns a non-empty string from the expected pool.
- `.gitignore`: stop tracking runtime state generated by tests
  (profiles/, long_term_memory.json, schedule.json, macros.json,
  llm_backend.txt, llm_history.json) — these are user data, not
  source.

Tests: 54 → 60 (+6).
This commit is contained in:
Bossiara13 2026-05-16 13:53:44 +03:00
parent 6079d2730f
commit 45d9425ed7
6 changed files with 337 additions and 0 deletions

10
main.py
View file

@ -1689,6 +1689,16 @@ def run_action(action):
extensions.do_habit_checkin(action, _current_voice or '')
elif t == 'habit_streak':
extensions.do_habit_streak(action, _current_voice or '')
elif t == 'personality_greet':
extensions.do_personality_greet(action, _current_voice or '')
elif t == 'personality_thanks':
extensions.do_personality_thanks(action, _current_voice or '')
elif t == 'personality_compliment':
extensions.do_personality_compliment(action, _current_voice or '')
elif t == 'personality_how_are_you':
extensions.do_personality_how_are_you(action, _current_voice or '')
elif t == 'personality_tony_quote':
extensions.do_personality_tony_quote(action, _current_voice or '')
_current_voice: str = ''