Skip to content

emrg: GUI WorkBuddy P2 — Ask/Auto mode (rant 21:35) - #499

Closed
argszero wants to merge 1 commit into
masterfrom
feature/gui-workbuddy-p2
Closed

emrg: GUI WorkBuddy P2 — Ask/Auto mode (rant 21:35)#499
argszero wants to merge 1 commit into
masterfrom
feature/gui-workbuddy-p2

Conversation

@argszero

@argszero argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Phase P2 of the GUI WorkBuddy improvements (rant 2026-08-06T21:35:10, host-confirmed design): Ask/Auto working mode. Ask = chat-only (no tools), Auto = normal tool execution (default).

Changes

  • emrg/server/daemon.py: task frame accepts mode: "ask"allow_tools=False_run_tool_loop sends an empty tool set to the LLM (it can only reply in plain chat; loop exits after round 1). Auto (default) unchanged — full tool set.
  • emrg/gui/daemon_client.js: sendTask accepts mode, includes payload.mode when not "auto"
  • emrg/gui/main.js: emrg:sendMessage passes mode through
  • renderer: mode switcher (Ask ● ○ Auto capsule) next to the model switcher; state.mode tracked; sendMessage payload carries mode; light hint when switching to Ask
  • CSS: capsule styles (active pill, hover)
  • Tests: 2 daemon tests (ask → LLM receives no tools; auto → full tool set incl. bash/read) + 1 GUI test (default auto, setMode→ask, sendMessage carries mode=ask)

Verification

  • Python suite: 482 passed (+2)
  • GUI tests: 61/61 pass (+1)
  • All changed JS node --check clean; import check OK

Design mapping

Rant acceptance: ✅ Ask 模式 AI 只对话不执行工具(daemon 空工具集); ✅ Auto 正常执行(默认); ✅ 切换即时生效(下一条消息起用 state.mode). Daemon change is minimal (one field read + one param).

Ask mode: pure chat, no tool execution. Auto mode (default): normal
tool loop.

- daemon.py: task frame accepts mode='ask' → allow_tools=False →
  _run_tool_loop sends an EMPTY tool set to the LLM (can only reply);
  loop exits after round 1 with finish_reason=stop
- daemon_client.js: sendTask accepts mode, includes payload.mode when
  != 'auto'
- main.js: emrg:sendMessage passes mode through
- renderer: mode switcher (Ask ● ○ Auto capsule) next to model switcher;
  state.mode tracked, sendMessage payload carries mode; Ask 切换轻提示
- CSS: capsule styles (active pill, hover)
- tests: 2 daemon tests (ask → no tools, auto → full tool set incl.
  bash/read), 1 GUI test (default auto, setMode ask, sendMessage
  carries mode=ask)

Full suite: 482 Python + 61 GUI.

@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-214621 (author self-check). Verified in worktree: (1) 482/482 Python (2 new ask-mode tests: allow_tools=False → LLM receives [], allow_tools=True → full tool set incl. bash/read), 61/61 GUI (default auto, setMode ask, sendMessage carries mode); (2) daemon change minimal — task frame mode field + allow_tools param through _run_tool_loop_locked; Ask mode sends empty tool set so the loop exits after round 1; (3) mode passthrough verified end-to-end (renderer state → main IPC → daemon_client payload → daemon); (4) mode='auto' omits the field (wire-compatible with existing clients). P2 acceptance met.

@argszero

argszero commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Closing as duplicate: #500 (functionally identical daemon logic — mode=ask → allow_tools=False → empty tool set) reached 3 LGTMs and was merged first. Both implementations passed CI; #500 carries the extra app-commands routing tests. No divergent behavior lost — the Ask/Auto mode is fully covered on master.

@argszero argszero closed this Aug 6, 2026
@argszero
argszero deleted the feature/gui-workbuddy-p2 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