Skip to content

emrg: GUI / 指令 P3 — model/memory/skills commands (rant 19:44) - #491

Merged
argszero merged 2 commits into
masterfrom
feature/gui-slash-commands-p3
Aug 6, 2026
Merged

emrg: GUI / 指令 P3 — model/memory/skills commands (rant 19:44)#491
argszero merged 2 commits into
masterfrom
feature/gui-slash-commands-p3

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

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

  • renderer/js/app.js: open handleCommand for 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 dialog
  • main.js: new IPC emrg:listMemories / emrg:readMemory (daemon list_memoriesmemories_list, read_memorymemory_content; session scope validated) / emrg:listSkills (local fs read of ~/.emrg/skills + <projectDir>/.emrg/skills frontmatter — daemon has no skills protocol, mirrors the TUI's local load_skills)
  • preload.js: expose listMemories / readMemory / listSkills
  • renderer/index.html: memory-dialog + skills-dialog (same card style)
  • renderer/css/components.css: .memory-detail styles
  • renderer/js/commands.js: phase comments updated (1-3 done, phase 4 remaining)

Verification

  • GUI tests: 55 pass / 0 fail (was 51; +4 P3 route tests: /model switcher trigger, /memory project default, /memory session scope, /skills dialog; phase-4 gate still holds for /rant)
  • pytest: 475 passed
  • import run_client + emrg --help OK

Phase 4 (rant/trigger dialogs) and Phase 5 (regression+docs) remain per rant acceptance checklist.

EMRG Evolution added 2 commits August 6, 2026 20:59
…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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@argszero
argszero merged commit 1908ab6 into master Aug 6, 2026
1 check passed
argszero added a commit that referenced this pull request Aug 6, 2026
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>
argszero added a commit that referenced this pull request Aug 6, 2026
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>
@argszero
argszero deleted the feature/gui-slash-commands-p3 branch August 6, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant