Files
deepseek-harness/packages/client/ui-permission/README.md
T
imccyu ff06272774 feat(web): /permission popup picker (hostBacked contribution)
Bare /permission now opens a flat popupSelect of presets (current value
active, custom excluded) instead of returning a text report — the /model
pattern on a single-level list. The new dsh-client-ui-permission package
registers the contribution; a pick submits '/permission <preset>' through
Session.command, so the picker, the composer chip, and the argued line all
write through the one host command and follow the one pushed projection
frame. Options and availability read the 'permissions' projection.

ui-command gains the hostBacked contribution mode: a same-named host
command is cooperation, not a collision — the host keeps the catalog row,
the argument claim (space and argued-enter fall through to the host path),
and the lifecycle logging, while the contribution supplies only the
bare-invocation popup. The /permission command handler keeps its bare-line
text report for host surfaces without a popup layer (TUI, raw execute).
2026-07-28 23:38:22 +08:00

1.6 KiB

@deepseek-ai/dsh-client-ui-permission

English | 中文

Permission preset selection plugin, browser half: the /permission popupSelect contribution (registered through ctx.command). The contribution is hostBacked — the host's /permission command owns the slash-menu row, the argued path (/permission <preset> switches directly), and the durable lifecycle logging; this entry supplies only the bare-invocation picker: one flat preset list with the current value marked active, where a pick submits the /permission <preset> command line. Options and the active mark read the session's permissions projection (the same host-computed select the composer chip renders), so both surfaces share one read source and one write path, and the pushed projection frame is the single confirmation both follow. The contribution is available exactly while the projection key is present; a permission-less composition shows no picker.

The /client export surface is the plugin body (apply/inject).

Model Experience

Indirectly, through the host /permission command the picker submits: a switch appends the whole-value knob events (permission/preset, sandbox/mode, approval/policy), which select the sandbox mode and approval policy later tool calls resolve. Picker interaction adds no prompt content.

KV Cache effect

No direct invalidation; the knob consumers own any request-prefix changes.

Known Limitations and Deferred Work

  • No keyless snapshot exercises the picker yet — the popup flow is covered by unit specs over fake faces; the assembled-transcript scenario rides the deferred approval/preset e2e work.