Auto-approve all (全部自动同意) ships in agent-console 1.3.1, split out of #727 (qingnian108).
The mode is off by default. In it, Codex runs with its sandbox off and Claude Code skips its checks. Cursor, OpenCode and dsh requests are answered allow-once by the console, never allow_always or acceptForSession. Each auto answer is saved with `auto: true` before the Agent goes on, and a banner shows while the mode is on. Plan confirmations and questions still ask. A 1.2 默认 of 全部放行 is not silently upgraded to real auto-approve. Pi keeps the `default` mode id ("Pi never asks"), so switching Agents before the first message never carries auto-approve into an Agent the user didn't pick.
Reviewed at 7e55c87ca merged onto main 20b89389:
- Linux (WSL2 Ubuntu 24.04): root `bun test packages/agent-console` 6/6; `bun scripts/check.mjs` OK; `npm run check` OK; vitest 461 passed / 17 skipped; `verify:build` 5/5 identical.
- Windows 11 (Edge): `e2e:v1` 29/29.
- Linux e2e stops at scenario 5 (steer timeout). It does the same on main 1.3.0, so it was filed as #753.
- Broken by hand:
- Pi's modeMap back to bypassPermissions: 2 tests red.
- The keeps line shown for every Agent: 1 test red.
- Pi's label branch removed: 1 test red.
- An earlier round at 049449612 on macOS checked the daemon behaviour with probes. This version is published from the dist branch; the package isn't on npm.
This commit is contained in:
@@ -8,11 +8,29 @@
|
||||
}
|
||||
.cp-card:focus-within { border-color: var(--cp-focus); box-shadow: 0 0 0 3px var(--cp-ring), 0 1px 2px rgb(0 0 0 / .04); }
|
||||
.cp-card.waiting { border-color: color-mix(in oklab, var(--warn) 45%, var(--bg)); }
|
||||
.cp-card.danger { border-color: color-mix(in oklab, var(--danger) 40%, var(--bg)); }
|
||||
.cp-danger {
|
||||
max-width: var(--col); margin: 0 auto 6px; display: flex; align-items: center; gap: 6px;
|
||||
color: var(--danger); font-size: var(--fs-s); padding: 0 2px;
|
||||
/* 1.3 全部自动同意 (#727 review 1): a persistent one-line strip above the card (Nolan: one slim line is enough) for as long as the conversation is in it, plus a
|
||||
warning-tinted card border and chip. The one exception to the grayscale accent: the semantic warning colour, darker in
|
||||
light mode so small text stays readable (≥4.5:1 on the page background), lighter in dark mode. */
|
||||
:root { --auto-fg: #b45309; --auto-bg: color-mix(in oklab, #f59e0b 10%, var(--bg)); --auto-line: color-mix(in oklab, #d97706 40%, var(--bg)); }
|
||||
:root[data-theme="dark"] { --auto-fg: #fbbf24; --auto-bg: color-mix(in oklab, #f59e0b 13%, var(--bg)); --auto-line: color-mix(in oklab, #f59e0b 42%, var(--bg)); }
|
||||
.cp-auto-on {
|
||||
max-width: var(--col); margin: 0 auto 4px; display: flex; align-items: center; gap: 6px; min-width: 0;
|
||||
height: 22px; padding: 0 4px; white-space: nowrap; overflow: hidden;
|
||||
color: var(--muted); font-size: var(--fs-s); line-height: 22px;
|
||||
}
|
||||
.cp-auto-ic { flex: none; display: inline-flex; color: var(--auto-fg); }
|
||||
.cp-auto-t { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; cursor: help; border-radius: var(--r-s); }
|
||||
.cp-auto-t:focus-visible { outline: 2px solid var(--auto-line); outline-offset: 1px; }
|
||||
.cp-auto-t b { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--auto-fg); font-weight: 600; }
|
||||
.cp-auto-on .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
||||
.cp-auto-back {
|
||||
flex: none; margin-left: auto; padding: 0 2px; border: 0; background: none; white-space: nowrap;
|
||||
color: var(--fg); font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 2px;
|
||||
text-decoration-color: color-mix(in oklab, var(--fg) 35%, transparent); cursor: pointer;
|
||||
}
|
||||
.cp-auto-back:hover { text-decoration-color: currentColor; }
|
||||
.cp-card.auto-on { border-color: var(--auto-line); }
|
||||
.cp-card.auto-on:focus-within { border-color: var(--auto-fg); }
|
||||
.cp-hint { max-width: var(--col); margin: 6px auto 0; font-size: var(--fs-xs); color: var(--meta); text-align: center; }
|
||||
.att-note { padding: 6px 10px 0; color: var(--muted); font-size: var(--fs-s); }
|
||||
.cp-ta-wrap { position: relative; }
|
||||
@@ -82,6 +100,12 @@
|
||||
}
|
||||
.tasks-pill:hover { color: var(--fg); background: var(--surface-hover); }
|
||||
.tasks-pill svg { flex: none; color: var(--meta); }
|
||||
/* 1.3 全部自动同意: Cursor's shield idea, a filled chip with a shield-check, in the warning colour (#727 review 1) */
|
||||
.ipill.auto, .cp-bar .ipill.auto { color: var(--auto-fg); background: var(--auto-bg); border-color: var(--auto-line); font-weight: 600; }
|
||||
.ipill.auto:hover, .ipill.auto[aria-expanded="true"], .cp-bar .ipill.auto:hover, .cp-bar .ipill.auto[aria-expanded="true"] { background: color-mix(in oklab, var(--auto-fg) 16%, var(--bg)); }
|
||||
.ipill.auto svg { color: var(--auto-fg); }
|
||||
.mi.warn .sm-label { color: var(--auto-fg); }
|
||||
.ipill.static { cursor: default; }
|
||||
.mode-menu { max-width: 300px; }
|
||||
.cp-div { width: 1px; height: 14px; background: var(--line); margin: 0 4px; flex: none; }
|
||||
.cp-bar > .ibtn { flex: none; }
|
||||
|
||||
Reference in New Issue
Block a user