feat(workspace): add tool switches to the codeg-mcp popover
Rework the status-bar popover into something that can be acted on rather than only read. The bar glyph is now as plain as its neighbours — no tone, no count — and the state moves into a badge in the popover header. Below it sit a three-column strip (agent sessions, running delegations, depth cap) and one row per tool group, each carrying the icon the General settings page uses for that same switch, a one-line description, and a Switch that writes through. The footer keeps the Start action and opens full settings on the General page, where these switches live in full. That makes the popover a second editor for settings the General page already owns, which is what the rest of this change is about: - set_codeg_mcp_tool_group writes exactly the one key a switch owns. A whole-record write would lose a flip: automations and taskboard share a record and sit one click apart here, and delegation's record also holds the depth limit and the per-agent defaults. - Both records serialize their writers behind a mutex spanning write -> re-read -> apply -> broadcast. Their keys are read in separate queries, so interleaved writers could otherwise leave the database correct while the runtime config settled on a value neither intended. - Delegation now broadcasts delegation-settings://changed, and both General-page forms subscribe to their record's broadcast. A form left open across a popover toggle adopts it instead of reverting it on the next save, while a switch the user has already moved keeps its pending value. Also makes "general" an addressable settings section — the desktop transport otherwise falls back to Appearance — and adds the popover's copy in all ten locales.
X
xintaofei committed
03f5ada4afe2566f0bb01ec7f93929806fc75e7b
Parent: 3b87e70