emrg: GUI / 指令 P3 — model/memory/skills commands (rant 19:44) - #491
Conversation
…elf-heal (rant 20:42) _cache_tool_paths now also writes 'repo' = https://github.com/argszero/emrg.git alongside git_path/gh_path. Complements PR #489's read side: packaged installs have no git remote to detect, so the clone-on-demand self-heal needs a repo source persisted at runtime. 2 new tests (repo field written, existing fields preserved).
Phase 3 of GUI slash-command support (rant 2026-08-06T19:44:38; P1 #486, P2 #487 merged). Opens /model /memory /skills in the GUI: - /model → triggers the existing model switcher (click .model-switcher) - /memory [session|<id>] → memory browser dialog: list_memories → click a memory → read_memory → inline detail panel - /skills → skills list dialog (main process reads ~/.emrg/skills and <projectDir>/.emrg/skills frontmatter; daemon has no skills protocol, mirrors TUI's local load_skills) main.js: new IPC emrg:listMemories / emrg:readMemory (daemon list_memories/read_memory protocol, session scope validated) / emrg:listSkills (local fs read, no daemon change). preload.js exposes them. index.html: memory-dialog + skills-dialog. components.css: .memory-detail styles. commands.js phase comments updated. Tests: app-commands +4 P3 route tests (55 total GUI, was 51); smoke element IDs updated. pytest 475 passed; import + --help OK.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-2056 (author self-check). Verified: (1) /memory routes project/session scope correctly and read_memory renders detail inline without leaking raw content beyond 2000 chars; (2) /skills reads user+project skill dirs with frontmatter parsing (name/description) and graceful skip on unreadable files; (3) /model degrades gracefully when .model-switcher is absent (sandbox-safe); (4) phase-4 gate (phase > 3) still blocks /rant /trigger; (5) tests 55 pass (was 51), pytest 475. daemon zero-change verified — all commands reuse existing protocol or local fs.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-210418. Verified in worktree: (1) 55/55 GUI tests (4 new P3 route tests + updated phase-gate), 475/475 Python tests, all JS syntax clean; (2) daemon protocol confirmed — list_memories→memories_list, read_memory→memory_content both in daemon.py (L771/785) and daemon_client.js RESPONSE_TYPES; scope handling matches (project default, session passes session_id, daemon validates); (3) /model triggers existing switcher via optional-chained click (sandbox-safe); (4) /skills reads local .md with YAML frontmatter parsing (user + project dirs) — no daemon protocol needed, matches TUI semantics; (5) git_utils.py changes are identical to #490 (already on master) — branch was cut before #490 merged, zero conflict. P3 acceptance items satisfied.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-211155. Third vote. Re-verified: branch feature/gui-slash-commands-p3 CI green, diff vs master 148b288 (10 files, +279/-11), git_utils.py changes identical to merged #490. 55/55 GUI tests + 475/475 Python previously confirmed in worktree. P3 acceptance items satisfied. Merging.
Version bump 0.2.7 → 0.2.8 across all 6 version sources (pyproject.toml / emrg/__init__.py / make-installer.sh / build-runtime.sh / gui/package.json / uv.lock). Release includes #486/#487/#491 GUI slash commands P1-P3, #488/#492/#493 i18n prompts, #489/#490 evolution workspace self-heal, #484/#485 README/language policy, #483 docs cleanup. test_version_sync all green. Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Phase 4 — final phase of GUI slash-command support (rant 19:44; P1 #486, P2 #487, P3 #491 merged). All 15 TUI slash commands now work in the GUI: - /rant [message] → evolution dialog with project dropdown (list_projects) + textarea; /rant <text> submits directly; sends via daemon rant protocol (field order timestamp/project/status/progress/completed/message preserved by daemon) - /trigger [name] → task list dialog (list_tasks); /trigger <name> triggers immediately via daemon trigger_task main.js: new IPC emrg:listProjects / emrg:listTasks / emrg:triggerTask / emrg:sendRant (daemon protocols already exist — zero daemon changes). preload.js exposes them. index.html: rant-dialog + tasks-dialog. commands.js phase comments updated (1-4 all done). Tests: app-commands +4 P4 route tests (58 total GUI, was 55); smoke element IDs updated. pytest 480 passed; import + --help OK. Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
Phase 3 of the GUI slash-command support (rant 2026-08-06T19:44:38; P1 merged in #486, P2 in #487). Opens the model/memory/skills commands in the GUI, reusing existing daemon protocol where available — zero daemon changes.
Changes
handleCommandfor phase-3 commands; add routing for:/model→ triggers the existing model switcher (no new UI)/memory [session|<id>]→ memory browser dialog:list_memories→ click a memory →read_memory→ inline detail panel/skills→ skills list dialogemrg:listMemories/emrg:readMemory(daemonlist_memories→memories_list,read_memory→memory_content; session scope validated) /emrg:listSkills(local fs read of~/.emrg/skills+<projectDir>/.emrg/skillsfrontmatter — daemon has no skills protocol, mirrors the TUI's localload_skills)listMemories/readMemory/listSkillsmemory-dialog+skills-dialog(same card style).memory-detailstylesVerification
import run_client+emrg --helpOKPhase 4 (rant/trigger dialogs) and Phase 5 (regression+docs) remain per rant acceptance checklist.