feat: codebase_qa + github_pr in Python (142 → 148 commands)
Closes the Python parity gap with rust. All major imba features now mirrored
EXCEPT live LLM hot-swap (python LLM backend is still env-driven, not voice-
switchable like rust).
dev_handlers.py (new, ~250 lines)
Codebase Q&A:
do_codebase_set "укажи проект C:\path" → memory_store.remember("codebase.root", ...)
do_codebase_where "какой проект сейчас"
do_codebase_ask "что делает функция X" / "найди в коде Y"
Walks the root with same caps as rust:
depth=3, files=30, file_bytes=4096, total=50000
Filters by extension (rs/py/ts/lua/go/...).
Skips .git/target/node_modules/__pycache__/.venv etc.
Feeds digest to Groq LLM with "senior reviewer" prompt.
GitHub PR review (requires `gh` CLI authenticated):
do_github_set_repo "текущий репо owner/repo" → memory_store
do_github_list_prs "какие пиары" → `gh pr list --json number,title,author`,
speaks count + first 3 titles
do_github_summarize_pr "разбери последний пиар" → gh pr view of latest open
PR, feeds title+body+diff stat to LLM, speaks 3-5
sentence review.
extensions.py — 6 new proxy handlers + import dev_handlers + set_speak wires it.
main.py — 6 new action_type dispatches in run_action.
commands.yaml (+6 entries, 142 → 148):
codebase_set, codebase_where, codebase_ask,
github_set_repo, github_list_prs, github_summarize_pr.
Tests: ast.parse passes for all .py files. yaml.safe_load = 148 entries.
PYTHON PARITY VS RUST IS NOW COMPLETE except:
✗ LLM hot-swap voice command (rust calls llm::swap_to + persists DB;
python config.GROQ_TOKEN is read once at startup)
✗ GUI pages (rust has Tauri+Svelte, python is console-only)
Everything else has full parity: memory / profiles / vision / macros /
scheduler / codebase Q&A / GitHub PR review / 14 utility packs.
This commit is contained in:
parent
6a328077bc
commit
31ff997782
4 changed files with 463 additions and 0 deletions
38
main.py
38
main.py
|
|
@ -1588,6 +1588,44 @@ def run_action(action):
|
|||
extensions.do_profile_set(action, _current_voice or '')
|
||||
elif t == 'profile_what':
|
||||
extensions.do_profile_what(action, _current_voice or '')
|
||||
elif t == 'vision_describe':
|
||||
extensions.do_vision_describe(action, _current_voice or '')
|
||||
elif t == 'vision_read_error':
|
||||
extensions.do_vision_read_error(action, _current_voice or '')
|
||||
elif t == 'macros_start':
|
||||
extensions.do_macros_start(action, _current_voice or '')
|
||||
elif t == 'macros_save':
|
||||
extensions.do_macros_save(action, _current_voice or '')
|
||||
elif t == 'macros_cancel':
|
||||
extensions.do_macros_cancel(action, _current_voice or '')
|
||||
elif t == 'macros_replay':
|
||||
extensions.do_macros_replay(action, _current_voice or '')
|
||||
elif t == 'macros_list':
|
||||
extensions.do_macros_list(action, _current_voice or '')
|
||||
elif t == 'macros_delete':
|
||||
extensions.do_macros_delete(action, _current_voice or '')
|
||||
elif t == 'scheduler_add_reminder':
|
||||
extensions.do_scheduler_add_reminder(action, _current_voice or '')
|
||||
elif t == 'scheduler_add_recurring':
|
||||
extensions.do_scheduler_add_recurring(action, _current_voice or '')
|
||||
elif t == 'scheduler_list':
|
||||
extensions.do_scheduler_list(action, _current_voice or '')
|
||||
elif t == 'scheduler_clear':
|
||||
extensions.do_scheduler_clear(action, _current_voice or '')
|
||||
elif t == 'scheduler_cancel_by_text':
|
||||
extensions.do_scheduler_cancel_by_text(action, _current_voice or '')
|
||||
elif t == 'codebase_set':
|
||||
extensions.do_codebase_set(action, _current_voice or '')
|
||||
elif t == 'codebase_where':
|
||||
extensions.do_codebase_where(action, _current_voice or '')
|
||||
elif t == 'codebase_ask':
|
||||
extensions.do_codebase_ask(action, _current_voice or '')
|
||||
elif t == 'github_set_repo':
|
||||
extensions.do_github_set_repo(action, _current_voice or '')
|
||||
elif t == 'github_list_prs':
|
||||
extensions.do_github_list_prs(action, _current_voice or '')
|
||||
elif t == 'github_summarize_pr':
|
||||
extensions.do_github_summarize_pr(action, _current_voice or '')
|
||||
|
||||
|
||||
_current_voice: str = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue