feat(web): choose the default agent preset from General settings

One settings row picking which preset new sessions are composed from.

It is deliberately a new-session preference, not a live switch: a session's
preset is fixed at creation and the host refuses to adopt an existing session
under a different one, so the row says "applies to sessions you start from now
on" rather than implying it can retune a running agent.

Options and the current value come from one `agentPreset.list` call — the
roster already reports which id an unspecified session gets, so the row needs
no settings-schema introspection, unlike the permission row it is modelled on.
The write targets only the namespace's `default` field.

The menu marks `user` rows: a locally authored preset is exactly as privileged
as the plugins it names, and presenting it identically to a shipped one would
hide that.

An empty roster reads as `unavailable` and renders nothing, because composing
no presets is a valid deployment rather than a failure — distinct from a
roster call that failed, which surfaces its message.
This commit is contained in:
Yichen Jiang
2026-08-04 00:25:19 +08:00
parent e6fe32b3c3
commit 6758da87ae
24 changed files with 760 additions and 0 deletions

View File

@@ -180,6 +180,11 @@
- id: ui-permission
name: '@deepseek-ai/dsh-client-ui-permission'
# The agent-preset row in General settings: the default preset for
# sessions created later. Absent a roster it renders nothing.
- id: ui-agent-preset
name: '@deepseek-ai/dsh-client-ui-agent-preset'
# Plan control: the composer plan seat over the plan projection + /plan channel.
- id: ui-plan
name: '@deepseek-ai/dsh-client-ui-plan'