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
|
|
@ -1220,3 +1220,58 @@ scheduler_cancel_text:
|
|||
- отмени про
|
||||
- забудь напоминание про
|
||||
action: {type: scheduler_cancel_by_text}
|
||||
|
||||
codebase_set:
|
||||
phrases:
|
||||
- укажи проект
|
||||
- укажи папку проекта
|
||||
- укажи кодовую базу
|
||||
- выбери проект
|
||||
- проект сейчас
|
||||
action: {type: codebase_set}
|
||||
|
||||
codebase_where:
|
||||
phrases:
|
||||
- какой проект сейчас
|
||||
- где проект
|
||||
- какая папка проекта
|
||||
- какая кодовая база
|
||||
action: {type: codebase_where}
|
||||
|
||||
codebase_ask:
|
||||
phrases:
|
||||
- что делает функция
|
||||
- спроси код
|
||||
- вопрос по коду
|
||||
- что в коде
|
||||
- найди в коде
|
||||
- найди в проекте
|
||||
- объясни код
|
||||
action: {type: codebase_ask}
|
||||
|
||||
github_set_repo:
|
||||
phrases:
|
||||
- текущий репо
|
||||
- установи репо
|
||||
- выбери репо
|
||||
- репозиторий
|
||||
action: {type: github_set_repo}
|
||||
|
||||
github_list_prs:
|
||||
phrases:
|
||||
- какие пиары
|
||||
- какие пулл реквесты
|
||||
- что в пиарах
|
||||
- что в pr
|
||||
- открытые пиары
|
||||
- список пиаров
|
||||
action: {type: github_list_prs}
|
||||
|
||||
github_summarize_pr:
|
||||
phrases:
|
||||
- разбери последний пиар
|
||||
- объясни последний пиар
|
||||
- обзор последнего пиара
|
||||
- что в последнем pr
|
||||
- разбор pr
|
||||
action: {type: github_summarize_pr}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue