feat(agent-presets): give a preset a name and a description

A picker showed directory names, so the settings page could only ever list
`standard` / `core-web` / `cordis` and hope the reader knew what they meant.
A preset may now publish display text in an optional `preset.yml` beside
its composition, and the section renders cards — name, description, and the
one in use — instead of rows.

The file carries display text ONLY. `id` is the directory name and `trust`
comes from the root a preset was discovered under, so neither is writable
there: otherwise a locally authored preset could name itself into the
shipped set. It is a separate file because a composition is a top-level list
of plugin rows — YAML cannot carry sibling keys beside it, and a fake
metadata row would hand the Loader something to load.

Every read failure degrades to no metadata; absent, malformed, wrongly
typed, and blank all mean the same thing and the picker falls back to the
id. Presentation is not capability: a preset whose name is broken still
mounts.

The editor gained name and description fields above the YAML, and clearing
both removes the file rather than storing a blank name.
This commit is contained in:
Yichen Jiang
2026-08-05 16:30:14 +08:00
parent 5b93f48f78
commit 7281615d44
27 changed files with 593 additions and 68 deletions

View File

@@ -0,0 +1,2 @@
name: 创造模式
description: 标准模式加上自指工具集,可以读改自己运行的这套组装,并据此创作新的预设。

View File

@@ -0,0 +1,2 @@
name: 极简模式
description: 只向模型呈现 bash 与 str_replace_editor适合 benchmark 与最小复现。

View File

@@ -0,0 +1,2 @@
name: 标准模式
description: 完整的编码 agent文件读写、shell、检索、计划、委派与工作流。