emrg: GUI WorkBuddy P2 — Ask/Auto mode (rant 21:35) - #499
Conversation
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
left a comment
There was a problem hiding this comment.
✅ 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.
|
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. |
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
mode: "ask"→allow_tools=False→_run_tool_loopsends 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.sendTaskacceptsmode, includespayload.modewhen not "auto"emrg:sendMessagepassesmodethroughstate.modetracked;sendMessagepayload carriesmode; light hint when switching to AskVerification
node --checkclean; import check OKDesign mapping
Rant acceptance: ✅ Ask 模式 AI 只对话不执行工具(daemon 空工具集); ✅ Auto 正常执行(默认); ✅ 切换即时生效(下一条消息起用 state.mode). Daemon change is minimal (one field read + one param).