fix(plugins): preserve Creator drafts and refresh bundle validation

This commit is contained in:
Tianyi Cui committed 2026-10-06 23:48:59 +08:00
1 parent 55dfd3bab1
commit 2b0dd1567d
17 files changed
+64 -125

No files matched your search

+12 -12
View File
@@ -184,9 +184,10 @@ async function seedSubagent(scaffold: WebScaffold, parentId: SessionId): Promise
* seeded session records `minimal` too, so a substring match over the whole
* list answers before the switch has landed.
* @param scaffold - authenticated Web Host scaffold.
* @param targetId - exact Session to inspect after several Sessions have been created.
* @returns the live session's preset, or undefined before it is listed.
*/
async function livePreset(scaffold: WebScaffold): Promise<string | undefined> {
async function livePreset(scaffold: WebScaffold, targetId?: SessionId): Promise<string | undefined> {
const response = await scaffold.hostFetch('/api/session/list', {
method: 'POST',
headers: { 'content-type': 'application/json' },
@@ -205,7 +206,7 @@ async function livePreset(scaffold: WebScaffold): Promise<string | undefined> {
}
}
}
const preset = body.result.value?.items.find(item => item.sessionId !== SEED_ID)
const preset = body.result.value?.items.find(item => targetId === undefined ? item.sessionId !== SEED_ID : item.sessionId === targetId)
?.projections?.values.agentPreset
return typeof preset === 'string' ? preset : undefined
}
@@ -356,7 +357,7 @@ describe('web e2e: agent-preset selection', () => {
await writeComposerDraft(page, composer, '')
}, 90_000)
it('resets the hidden default to Standard while preserving the blank session until the user switches it', async () => {
it('preserves the current mode while New Session uses the reset Standard default', async () => {
onTestFailed(() => saveFailureShot(page, 'web-e2e-agent-preset-disabled'))
await expect.poll(() => livePreset(scaffold), { timeout: 15_000 }).toBe('standard')
@@ -380,16 +381,15 @@ describe('web e2e: agent-preset selection', () => {
await page.keyboard.press('Escape')
await expect.poll(async () => (await scaffold.ctx.agentPresets.remoteExportList()).presets.find(preset => preset.isDefault)?.id).toBe('standard')
const reuse = page.waitForResponse('**/api/session/create')
const creation = page.waitForResponse('**/api/session/create')
await page.getByRole('button', { name: 'New session', exact: true }).last().click()
const reused = await reuse
expect(reused.request().postDataJSON()).toHaveProperty('payload.args.request.sessionId')
expect(await reused.json()).toMatchObject({ result: { ok: true, value: { agentPreset: 'minimal' } } })
const created = await creation
expect(created.request().postDataJSON()).not.toHaveProperty('payload.args.request.sessionId')
const createdBody = await created.json() as { result: { value: { sessionId: SessionId; agentPreset: string } } }
expect(createdBody).toMatchObject({ result: { ok: true, value: { agentPreset: 'standard' } } })
const freshSessionId = createdBody.result.value.sessionId
await page.reload()
await page.getByRole('button', { name: 'Minimal mode', exact: true }).click()
await expect.poll(() => livePreset(scaffold), { timeout: 15_000 }).toBe('minimal')
await page.getByRole('menuitem', { name: /^Standard mode/ }).click()
await expect.poll(() => livePreset(scaffold), { timeout: 15_000 }).toBe('standard')
await page.getByRole('button', { name: 'Standard mode', exact: true }).waitFor()
await openSettings(page, 'en')
const reopened = page.getByRole('dialog', { name: 'Settings' })
@@ -402,7 +402,7 @@ describe('web e2e: agent-preset selection', () => {
await reopened.getByRole('button', { name: 'New task default: Standard mode' }).waitFor({ timeout: 10_000 })
await reopened.getByRole('button', { name: 'Set as new task default: Minimal mode' }).waitFor({ timeout: 10_000 })
await reopened.getByRole('button', { name: 'Close' }).last().click()
await expect.poll(() => livePreset(scaffold), { timeout: 15_000 }).toBe('standard')
await expect.poll(() => livePreset(scaffold, freshSessionId), { timeout: 15_000 }).toBe('standard')
await page.getByRole('button', { name: 'Standard mode' }).waitFor({ timeout: 10_000 })
})
@@ -6,7 +6,7 @@
- button "添加插件"
- button "选择添加插件方式"
- heading "官方" [level=3]
- text: "17"
- text: "15"
- list:
- listitem:
- button "查看 智能体团队": 智能体团队
@@ -32,6 +32,10 @@
- button "查看 Ralph 循环": Ralph 循环
- text: 实验性 使用新智能体执行用户明确要求的循环工作。
- switch "启用 Ralph 循环"
- listitem:
- button "查看 会话搜索": 会话搜索
- text: 实验性 为智能体提供搜索和读取当前工作区历史会话的工具。
- switch "启用 会话搜索"
- listitem:
- button "查看 随对话更新的标题": 随对话更新的标题
- text: 实验性 在收到新的用户提示时更新会话标题。
@@ -48,18 +52,6 @@
- button "查看 语音输入": 语音输入
- text: 实验性 在本机使用 SenseVoice 转写录音,首次使用需安装依赖。
- switch "启用 语音输入"
- listitem:
- button "查看 会话搜索": 会话搜索
- text: 为智能体提供搜索和读取当前工作区历史会话的工具。
- switch "启用 会话搜索"
- listitem:
- button "查看 字符串编辑器": 字符串编辑器
- text: 使用 str_replace_editor 工具编辑文件。
- switch "启用 字符串编辑器"
- listitem:
- button "查看 tmux 位置": tmux 位置
- text: 在可用时让智能体读取当前 tmux 窗格和布局。
- switch "启用 tmux 位置"
- listitem:
- button "查看 终端": 终端
- text: 限制每条命令最多能跑多久、最多输出多少内容。
@@ -6,7 +6,7 @@
- button "添加插件"
- button "选择添加插件方式"
- heading "官方" [level=3]
- text: "17"
- text: "15"
- list:
- listitem:
- button "查看 智能体团队": 智能体团队
@@ -32,6 +32,10 @@
- button "查看 Ralph 循环": Ralph 循环
- text: 实验性 使用新智能体执行用户明确要求的循环工作。
- switch "启用 Ralph 循环"
- listitem:
- button "查看 会话搜索": 会话搜索
- text: 实验性 为智能体提供搜索和读取当前工作区历史会话的工具。
- switch "启用 会话搜索"
- listitem:
- button "查看 随对话更新的标题": 随对话更新的标题
- text: 实验性 在收到新的用户提示时更新会话标题。
@@ -48,18 +52,6 @@
- button "查看 语音输入": 语音输入
- text: 实验性 在本机使用 SenseVoice 转写录音,首次使用需安装依赖。
- switch "启用 语音输入"
- listitem:
- button "查看 会话搜索": 会话搜索
- text: 为智能体提供搜索和读取当前工作区历史会话的工具。
- switch "启用 会话搜索"
- listitem:
- button "查看 字符串编辑器": 字符串编辑器
- text: 使用 str_replace_editor 工具编辑文件。
- switch "启用 字符串编辑器"
- listitem:
- button "查看 tmux 位置": tmux 位置
- text: 在可用时让智能体读取当前 tmux 窗格和布局。
- switch "启用 tmux 位置"
- listitem:
- button "查看 终端": 终端
- text: 限制每条命令最多能跑多久、最多输出多少内容。
@@ -6,7 +6,7 @@
- button "添加插件"
- button "选择添加插件方式"
- heading "官方" [level=3]
- text: "17"
- text: "15"
- list:
- listitem:
- button "查看 智能体团队": 智能体团队
@@ -32,6 +32,10 @@
- button "查看 Ralph 循环": Ralph 循环
- text: 实验性 使用新智能体执行用户明确要求的循环工作。
- switch "启用 Ralph 循环"
- listitem:
- button "查看 会话搜索": 会话搜索
- text: 实验性 为智能体提供搜索和读取当前工作区历史会话的工具。
- switch "启用 会话搜索"
- listitem:
- button "查看 随对话更新的标题": 随对话更新的标题
- text: 实验性 在收到新的用户提示时更新会话标题。
@@ -48,18 +52,6 @@
- button "查看 语音输入": 语音输入
- text: 实验性 在本机使用 SenseVoice 转写录音,首次使用需安装依赖。
- switch "启用 语音输入"
- listitem:
- button "查看 会话搜索": 会话搜索
- text: 为智能体提供搜索和读取当前工作区历史会话的工具。
- switch "启用 会话搜索"
- listitem:
- button "查看 字符串编辑器": 字符串编辑器
- text: 使用 str_replace_editor 工具编辑文件。
- switch "启用 字符串编辑器"
- listitem:
- button "查看 tmux 位置": tmux 位置
- text: 在可用时让智能体读取当前 tmux 窗格和布局。
- switch "启用 tmux 位置"
- listitem:
- button "查看 终端": 终端
- text: 限制每条命令最多能跑多久、最多输出多少内容。
@@ -6,7 +6,7 @@ Focus at 500ms:
- tooltip "刷新"
failure: pending
- button "刷新" [disabled]
{"busy":"true","spinners":1,"cards":20,"skeletons":0,"alerts":[],"retry":0,"toasts":[]}
{"busy":"true","spinners":1,"cards":18,"skeletons":0,"alerts":[],"retry":0,"toasts":[]}
failure: settled
- button "刷新"
{"busy":"false","spinners":0,"cards":20,"skeletons":0,"alerts":[],"retry":0,"toasts":["刷新失败,请重试"]}
{"busy":"false","spinners":0,"cards":18,"skeletons":0,"alerts":[],"retry":0,"toasts":["刷新失败,请重试"]}
+1 -3
View File
@@ -4587,6 +4587,7 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
| `@deepseek-ai/dsh-experimental-cot-translation-bundle` | — | [`packages/experimental/cot-translation-bundle/src/index.ts`](../packages/experimental/cot-translation-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-inspector-profile` | — | [`packages/experimental/inspector-profile/src/index.ts`](../packages/experimental/inspector-profile/src/index.ts) |
| `@deepseek-ai/dsh-experimental-ralph-bundle` | — | [`packages/experimental/ralph-bundle/src/index.ts`](../packages/experimental/ralph-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-session-search` | — | [`packages/experimental/session-search/src/index.ts`](../packages/experimental/session-search/src/index.ts) |
| `@deepseek-ai/dsh-experimental-session-titles-bundle` | — | [`packages/experimental/session-titles-bundle/src/index.ts`](../packages/experimental/session-titles-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-terminal-bundle` | — | [`packages/experimental/terminal-bundle/src/index.ts`](../packages/experimental/terminal-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-voice-input-bundle` | — | [`packages/experimental/voice-input-bundle/src/index.ts`](../packages/experimental/voice-input-bundle/src/index.ts) |
@@ -4615,13 +4616,10 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
| `@deepseek-ai/dsh-session-format-v1-to-v2` | — | [`packages/session/session-format-v1-to-v2/src/index.ts`](../packages/session/session-format-v1-to-v2/src/index.ts) |
| `@deepseek-ai/dsh-session-format-v2-to-v3` | — | [`packages/session/session-format-v2-to-v3/src/index.ts`](../packages/session/session-format-v2-to-v3/src/index.ts) |
| `@deepseek-ai/dsh-session-format-v3-to-v4` | — | [`packages/session/session-format-v3-to-v4/src/index.ts`](../packages/session/session-format-v3-to-v4/src/index.ts) |
| `@deepseek-ai/dsh-session-search` | — | [`packages/bundle/session-search/src/index.ts`](../packages/bundle/session-search/src/index.ts) |
| `@deepseek-ai/dsh-session-snapshot` | — | [`packages/test-support/session-snapshot/src/index.ts`](../packages/test-support/session-snapshot/src/index.ts) |
| `@deepseek-ai/dsh-session-telemetry` | — | [`packages/session/session-telemetry/src/index.ts`](../packages/session/session-telemetry/src/index.ts) |
| `@deepseek-ai/dsh-session-title-llm` | — | [`packages/session/session-title-llm/src/index.ts`](../packages/session/session-title-llm/src/index.ts) |
| `@deepseek-ai/dsh-string-editor` | — | [`packages/bundle/string-editor/src/index.ts`](../packages/bundle/string-editor/src/index.ts) |
| `@deepseek-ai/dsh-timeout` | — | [`packages/util/timeout/src/index.ts`](../packages/util/timeout/src/index.ts) |
| `@deepseek-ai/dsh-tmux-location` | — | [`packages/bundle/tmux-location/src/index.ts`](../packages/bundle/tmux-location/src/index.ts) |
| `@deepseek-ai/dsh-typert-generator` | — | [`packages/typert/generator/src/index.ts`](../packages/typert/generator/src/index.ts) |
| `@deepseek-ai/dsh-typert-protocol` | — | [`packages/typert/protocol/src/index.ts`](../packages/typert/protocol/src/index.ts) |
| `@deepseek-ai/dsh-typert-registry` | — | [`packages/typert/registry/src/index.ts`](../packages/typert/registry/src/index.ts) |
+1 -3
View File
@@ -4589,6 +4589,7 @@ export interface Config {
| `@deepseek-ai/dsh-experimental-cot-translation-bundle` | — | [`packages/experimental/cot-translation-bundle/src/index.ts`](../packages/experimental/cot-translation-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-inspector-profile` | — | [`packages/experimental/inspector-profile/src/index.ts`](../packages/experimental/inspector-profile/src/index.ts) |
| `@deepseek-ai/dsh-experimental-ralph-bundle` | — | [`packages/experimental/ralph-bundle/src/index.ts`](../packages/experimental/ralph-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-session-search` | — | [`packages/experimental/session-search/src/index.ts`](../packages/experimental/session-search/src/index.ts) |
| `@deepseek-ai/dsh-experimental-session-titles-bundle` | — | [`packages/experimental/session-titles-bundle/src/index.ts`](../packages/experimental/session-titles-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-terminal-bundle` | — | [`packages/experimental/terminal-bundle/src/index.ts`](../packages/experimental/terminal-bundle/src/index.ts) |
| `@deepseek-ai/dsh-experimental-voice-input-bundle` | — | [`packages/experimental/voice-input-bundle/src/index.ts`](../packages/experimental/voice-input-bundle/src/index.ts) |
@@ -4617,13 +4618,10 @@ export interface Config {
| `@deepseek-ai/dsh-session-format-v1-to-v2` | — | [`packages/session/session-format-v1-to-v2/src/index.ts`](../packages/session/session-format-v1-to-v2/src/index.ts) |
| `@deepseek-ai/dsh-session-format-v2-to-v3` | — | [`packages/session/session-format-v2-to-v3/src/index.ts`](../packages/session/session-format-v2-to-v3/src/index.ts) |
| `@deepseek-ai/dsh-session-format-v3-to-v4` | — | [`packages/session/session-format-v3-to-v4/src/index.ts`](../packages/session/session-format-v3-to-v4/src/index.ts) |
| `@deepseek-ai/dsh-session-search` | — | [`packages/bundle/session-search/src/index.ts`](../packages/bundle/session-search/src/index.ts) |
| `@deepseek-ai/dsh-session-snapshot` | — | [`packages/test-support/session-snapshot/src/index.ts`](../packages/test-support/session-snapshot/src/index.ts) |
| `@deepseek-ai/dsh-session-telemetry` | — | [`packages/session/session-telemetry/src/index.ts`](../packages/session/session-telemetry/src/index.ts) |
| `@deepseek-ai/dsh-session-title-llm` | — | [`packages/session/session-title-llm/src/index.ts`](../packages/session/session-title-llm/src/index.ts) |
| `@deepseek-ai/dsh-string-editor` | — | [`packages/bundle/string-editor/src/index.ts`](../packages/bundle/string-editor/src/index.ts) |
| `@deepseek-ai/dsh-timeout` | — | [`packages/util/timeout/src/index.ts`](../packages/util/timeout/src/index.ts) |
| `@deepseek-ai/dsh-tmux-location` | — | [`packages/bundle/tmux-location/src/index.ts`](../packages/bundle/tmux-location/src/index.ts) |
| `@deepseek-ai/dsh-typert-generator` | — | [`packages/typert/generator/src/index.ts`](../packages/typert/generator/src/index.ts) |
| `@deepseek-ai/dsh-typert-protocol` | — | [`packages/typert/protocol/src/index.ts`](../packages/typert/protocol/src/index.ts) |
| `@deepseek-ai/dsh-typert-registry` | — | [`packages/typert/registry/src/index.ts`](../packages/typert/registry/src/index.ts) |
+2 -6
View File
@@ -138,9 +138,6 @@ flowchart TD
pkg_headless["headless"]
pkg_sdk_app["sdk-app"]
pkg_sdk_minimal["sdk-minimal"]
pkg_session_search["session-search"]
pkg_string_editor["string-editor"]
pkg_tmux_location["tmux-location"]
pkg_web_app["web-app"]
end
subgraph group_client["packages/client"]
@@ -263,6 +260,7 @@ flowchart TD
pkg_experimental_ptc_runtime_python["experimental-ptc-runtime-python"]
pkg_experimental_ralph_bundle["experimental-ralph-bundle"]
pkg_experimental_session_inspector["experimental-session-inspector"]
pkg_experimental_session_search["experimental-session-search"]
pkg_experimental_session_titles_bundle["experimental-session-titles-bundle"]
pkg_experimental_speech_to_text["experimental-speech-to-text"]
pkg_experimental_speech_to_text_sensevoice["experimental-speech-to-text-sensevoice"]
@@ -1461,9 +1459,6 @@ flowchart TD
| [`base`](../packages/bundle/base) | `bundle` | — |
| [`sdk-app`](../packages/bundle/sdk-app) | `bundle` | — |
| [`sdk-minimal`](../packages/bundle/sdk-minimal) | `bundle` | — |
| [`session-search`](../packages/bundle/session-search) | `bundle` | — |
| [`string-editor`](../packages/bundle/string-editor) | `bundle` | — |
| [`tmux-location`](../packages/bundle/tmux-location) | `bundle` | — |
| [`client-file-upload`](../packages/client/file-upload) | `client` | — |
| [`client-hmr`](../packages/client/hmr) | `client` | — |
| [`client-locale`](../packages/client/locale) | `client` | — |
@@ -1534,6 +1529,7 @@ flowchart TD
| [`experimental-inspector-profile`](../packages/experimental/inspector-profile) | `experimental` | — |
| [`experimental-ralph-bundle`](../packages/experimental/ralph-bundle) | `experimental` | — |
| [`experimental-session-inspector`](../packages/experimental/session-inspector) | `experimental` | — |
| [`experimental-session-search`](../packages/experimental/session-search) | `experimental` | — |
| [`experimental-session-titles-bundle`](../packages/experimental/session-titles-bundle) | `experimental` | — |
| [`experimental-terminal-bundle`](../packages/experimental/terminal-bundle) | `experimental` | — |
| [`experimental-voice-input-bundle`](../packages/experimental/voice-input-bundle) | `experimental` | — |
+2 -6
View File
@@ -140,9 +140,6 @@ flowchart TD
pkg_headless["headless"]
pkg_sdk_app["sdk-app"]
pkg_sdk_minimal["sdk-minimal"]
pkg_session_search["session-search"]
pkg_string_editor["string-editor"]
pkg_tmux_location["tmux-location"]
pkg_web_app["web-app"]
end
subgraph group_client["packages/client"]
@@ -265,6 +262,7 @@ flowchart TD
pkg_experimental_ptc_runtime_python["experimental-ptc-runtime-python"]
pkg_experimental_ralph_bundle["experimental-ralph-bundle"]
pkg_experimental_session_inspector["experimental-session-inspector"]
pkg_experimental_session_search["experimental-session-search"]
pkg_experimental_session_titles_bundle["experimental-session-titles-bundle"]
pkg_experimental_speech_to_text["experimental-speech-to-text"]
pkg_experimental_speech_to_text_sensevoice["experimental-speech-to-text-sensevoice"]
@@ -1463,9 +1461,6 @@ flowchart TD
| [`base`](../packages/bundle/base) | `bundle` | — |
| [`sdk-app`](../packages/bundle/sdk-app) | `bundle` | — |
| [`sdk-minimal`](../packages/bundle/sdk-minimal) | `bundle` | — |
| [`session-search`](../packages/bundle/session-search) | `bundle` | — |
| [`string-editor`](../packages/bundle/string-editor) | `bundle` | — |
| [`tmux-location`](../packages/bundle/tmux-location) | `bundle` | — |
| [`client-file-upload`](../packages/client/file-upload) | `client` | — |
| [`client-hmr`](../packages/client/hmr) | `client` | — |
| [`client-locale`](../packages/client/locale) | `client` | — |
@@ -1536,6 +1531,7 @@ flowchart TD
| [`experimental-inspector-profile`](../packages/experimental/inspector-profile) | `experimental` | — |
| [`experimental-ralph-bundle`](../packages/experimental/ralph-bundle) | `experimental` | — |
| [`experimental-session-inspector`](../packages/experimental/session-inspector) | `experimental` | — |
| [`experimental-session-search`](../packages/experimental/session-search) | `experimental` | — |
| [`experimental-session-titles-bundle`](../packages/experimental/session-titles-bundle) | `experimental` | — |
| [`experimental-terminal-bundle`](../packages/experimental/terminal-bundle) | `experimental` | — |
| [`experimental-voice-input-bundle`](../packages/experimental/voice-input-bundle) | `experimental` | — |
@@ -15,11 +15,11 @@
en: d152484eb41ac6b4
zh: b3ad7867f23dad1c
/deepseek-ai-dsh-client-ui-agent-preset/use-this-package:
en: abb24ddb24f5588d
zh: 2c58c8cd0e2a335e
en: d616984e840f036e
zh: 3e7c97c7d10669eb
/deepseek-ai-dsh-client-ui-agent-preset/understand-the-implementation:
en: 4c88c83529317389
zh: 5125122bdacfa3da
en: b3221ef8bc6d8096
zh: 68cb05566249da10
/deepseek-ai-dsh-client-ui-agent-preset/further-exploration:
en: bbae8d79844bc481
zh: 4302107fd1f460e6
+2 -2
View File
@@ -29,7 +29,7 @@ Settings shows the built-in and custom card groups with default highlighting and
With Coding Tools off in General Settings, the new-session picker and Settings roster offer Standard, Creator, and custom presets; turning them on also offers PTC and Minimal. Default selection and the Creator entry remain available in both states. Choosing a healthy default also synchronizes the blank session on the current new-task surface. Creator starts a new task using the `cordis` preset.
Turning Coding Tools off clears all unapplied choices through the existing Developer tools subscription. Once the off value is accepted, a host-backed connection resets a saved built-in PTC or Minimal default to Standard. Saved Standard, Creator, and custom defaults (including named PTC or Minimal overrides) stay unchanged. The user can select an available preset again after turning Coding Tools off. Existing sessions, including blank sessions reused by New Session, keep their selected mode; its label remains visible even when that mode is absent from the menu. Turning Coding Tools back on does not restore the old default or cleared choice. A remote connection using in-memory settings does not rewrite the Host's default. If Standard is missing or broken, the default remains unchanged and an error is shown.
Turning Coding Tools off clears all unapplied choices through the existing Developer tools subscription. Once the off value is accepted, a host-backed connection resets a saved built-in PTC or Minimal default to Standard. Saved Standard, Creator, and custom defaults (including named PTC or Minimal overrides) stay unchanged. The user can select an available preset again after turning Coding Tools off. Existing sessions keep their selected mode; New Session uses the current default. An existing mode's label remains visible even when that mode is absent from the menu. Turning Coding Tools back on does not restore the old default or cleared choice. A remote connection using in-memory settings does not rewrite the Host's default. If Standard is missing or broken, the default remains unchanged and an error is shown.
Known shipped presets offer mode details and usage examples in a read-only dialog. Its tabs preserve each page's scroll position; closing returns focus to the opening action. Help does not change the new-task default. The default badge replaces the card's group badge, and the preset id appears beside the title. Guide copy and examples belong to this package.
@@ -45,7 +45,7 @@ Entering Creator selects `cordis` for the receiving blank Session without changi
`agentPresets/list` supplies the roster and marks the current default, and `agentPresets/read` one declaration's YAML for the viewer; default changes write the `agent-preset-registry` settings namespace. The picker, blank-session synchronization and read-only session label use recorded preset identities. Connection resets and settings updates refresh the roster.
`CreatePluginMenuItem` contributes to `plugins.add.actions` using the shared roster store. Its selection calls the owner's `onDismiss()` before the same `startCreatorDraft` callback exposed to Settings as `creatorDraft`. That callback stages `cordis` through `AgentPresetSeatController` and opens the task through `uiWorkspace.startSession`; it can reuse a blank Session and applies the staged choice when a Session binding becomes available. The choice is consumed once applied. Both Coding Tools states use the same picker and selection store, and `AgentPresetSeat` renders refusals through the shared `Toast` component.
`CreatePluginMenuItem` contributes to `plugins.add.actions` using the shared roster store. Its selection calls the owner's `onDismiss()` before the same `startCreatorDraft` callback exposed to Settings as `creatorDraft`. That callback stages `cordis` through `AgentPresetSeatController` and opens the task through `uiWorkspace.startSession` with explicit draft preservation; it can reuse a blank Session and applies the staged choice when a Session binding becomes available. The choice is consumed once applied. Both Coding Tools states use the same picker and selection store, and `AgentPresetSeat` renders refusals through the shared `Toast` component.
</details>
+2 -2
View File
@@ -29,7 +29,7 @@ kind: "package-reference"
关闭通用设置中的代码工作工具后,新会话选择器和设置页列表提供标准、创造和自定义预设;开启后还提供 PTC 和极简模式。两种状态下均保留默认值选择和创造入口。选择健康定义作为默认值也会同步当前新任务页面的空白会话。Creator 入口开启一个使用 `cordis` preset 的新任务。
关闭代码工作工具时,沿用现有 Developer tools 订阅清空所有尚未应用的选择。关闭状态被接受后,使用 Host 持久化设置的连接会将已保存的内置 PTC 或极简默认值回退为标准模式。已保存的标准、创造和自定义默认值(包括有名称的 PTC 或极简覆盖项)保持不变。关闭后用户仍可重新选择可用预设。已有会话(包括点击新建会话时复用的空白会话)保留所选模式;即使该模式不在菜单中,其标签仍会显示。重新开启代码工作工具不会恢复原默认值或已清除的选择。使用内存设置的远程连接不会改写 Host 的默认值。标准模式缺失或损坏时,默认值保持不变,并显示错误。
关闭代码工作工具时,沿用现有 Developer tools 订阅清空所有尚未应用的选择。关闭状态被接受后,使用 Host 持久化设置的连接会将已保存的内置 PTC 或极简默认值回退为标准模式。已保存的标准、创造和自定义默认值(包括有名称的 PTC 或极简覆盖项)保持不变。关闭后用户仍可重新选择可用预设。已有会话保留所选模式;新会话使用当前默认值。即使已有会话的模式不在菜单中,其标签仍会显示。重新开启代码工作工具不会恢复原默认值或已清除的选择。使用内存设置的远程连接不会改写 Host 的默认值。标准模式缺失或损坏时,默认值保持不变,并显示错误。
已知的内置预设提供只读的模式说明与使用示例对话框。各页签保留各自的滚动位置;关闭后焦点回到打开它的操作。帮助不会改变新任务默认值。默认徽标取代卡片的分组徽标,预设 id 显示在标题旁。指南文案与示例归本包所有。
@@ -45,7 +45,7 @@ kind: "package-reference"
`agentPresets/list` 提供列表并标记当前默认值,`agentPresets/read` 为查看器提供一条声明的 YAML;默认值的修改写入 `agent-preset-registry` settings 命名空间。选择器、空白会话同步和只读会话标签使用记录的 preset 标识。连接重置和设置更新会刷新列表。
`CreatePluginMenuItem` 使用共享的预设列表 store,向 `plugins.add.actions` 贡献菜单项。选择时先调用页面传入的 `onDismiss()`,再调用与设置页 `creatorDraft` 相同的 `startCreatorDraft` 回调。该回调通过 `AgentPresetSeatController` 暂存 `cordis`,再通过 `uiWorkspace.startSession` 打开任务;它可以复用空白 Session,并在 Session 绑定可用时应用暂存选择。暂存选择应用后即清除。代码工作工具开启或关闭时均使用同一个选择器和选择 store,`AgentPresetSeat` 通过共享的 `Toast` 组件显示拒绝原因。
`CreatePluginMenuItem` 使用共享的预设列表 store,向 `plugins.add.actions` 贡献菜单项。选择时先调用页面传入的 `onDismiss()`,再调用与设置页 `creatorDraft` 相同的 `startCreatorDraft` 回调。该回调通过 `AgentPresetSeatController` 暂存 `cordis`,再通过显式保留草稿的 `uiWorkspace.startSession` 调用打开任务;它可以复用空白 Session,并在 Session 绑定可用时应用暂存选择。暂存选择应用后即清除。代码工作工具开启或关闭时均使用同一个选择器和选择 store,`AgentPresetSeat` 通过共享的 `Toast` 组件显示拒绝原因。
</details>
@@ -201,7 +201,7 @@ export function apply(ctx: ClientContext): void {
const startCreatorDraft = () => {
const seat = mainBlankSeat() ?? unboundSeat
seat.stage('cordis', true)
scope.uiWorkspace.startSession()
scope.uiWorkspace.startSession(undefined, { clearPreviousDraft: false })
void seat.apply()
}
@@ -217,7 +217,7 @@ function uiWorkspaceDouble() {
const starts: unknown[] = []
return {
starts,
startSession: (workspaceId?: unknown) => { starts.push(workspaceId ?? null) },
startSession: (workspaceId?: unknown, options?: unknown) => { starts.push({ workspaceId, options }) },
}
}
@@ -1136,7 +1136,7 @@ describe('ui-agent-preset apply', () => {
await vi.waitFor(() => { expect(calls).toContain('select:cordis') })
expect(seat.hooks.agentPresetSeat.getSnapshot().current).toBe('cordis')
expect(uiWorkspace.starts).toHaveLength(1)
expect(uiWorkspace.starts).toEqual([{ workspaceId: undefined, options: { clearPreviousDraft: false } }])
conversation()
})
@@ -361,7 +361,7 @@ export const SERVICE_API: readonly ServiceApiEntry[] = [
},
{
signature: 'startSession(workspaceId?: WorkspaceId, options?: StartSessionOptions): void',
description: 'Start a New Session flow and navigate to its Session; a creation the Host refuses is shown through the Workspace notice and leaves the selection as it was.',
description: 'Create a fresh Session, or reuse a blank when preparing an explicit draft. A creation the Host refuses is shown through the Workspace notice and leaves the selection as it was.',
parameters: [{ name: 'workspaceId', description: 'explicit target; absent inherits the current or most recent Workspace.' }, { name: 'options', description: 'initial content; existing text or attachments are preserved unless clearPreviousDraft is true.' }],
},
{
+16 -42
View File
@@ -295,6 +295,9 @@ importers:
'@deepseek-ai/dsh-experimental-ralph-bundle':
specifier: workspace:*
version: link:../../packages/experimental/ralph-bundle
'@deepseek-ai/dsh-experimental-session-search':
specifier: workspace:*
version: link:../../packages/experimental/session-search
'@deepseek-ai/dsh-experimental-session-titles-bundle':
specifier: workspace:*
version: link:../../packages/experimental/session-titles-bundle
@@ -370,9 +373,6 @@ importers:
'@deepseek-ai/dsh-session-reference':
specifier: workspace:*
version: link:../../packages/context/session-reference
'@deepseek-ai/dsh-session-search':
specifier: workspace:*
version: link:../../packages/bundle/session-search
'@deepseek-ai/dsh-skill':
specifier: workspace:*
version: link:../../packages/skill/skill
@@ -382,9 +382,6 @@ importers:
'@deepseek-ai/dsh-skill-office':
specifier: workspace:*
version: link:../../packages/skill/skill-office
'@deepseek-ai/dsh-string-editor':
specifier: workspace:*
version: link:../../packages/bundle/string-editor
'@deepseek-ai/dsh-terminal':
specifier: workspace:*
version: link:../../packages/terminal/terminal
@@ -397,9 +394,6 @@ importers:
'@deepseek-ai/dsh-tmux-context':
specifier: workspace:*
version: link:../../packages/context/tmux-context
'@deepseek-ai/dsh-tmux-location':
specifier: workspace:*
version: link:../../packages/bundle/tmux-location
'@deepseek-ai/dsh-token-meter':
specifier: workspace:*
version: link:../../packages/llm/token-meter
@@ -2499,39 +2493,6 @@ importers:
specifier: workspace:~
version: link:../../../vendor/cordis
packages/bundle/session-search:
dependencies:
'@deepseek-ai/dsh-session-query-sqlite':
specifier: workspace:*
version: link:../../session-query/session-query-sqlite
'@deepseek-ai/dsh-tool-session-query':
specifier: workspace:*
version: link:../../session-query/tool-session-query
devDependencies:
'@deepseek-ai/cordis':
specifier: workspace:~
version: link:../../../vendor/cordis
packages/bundle/string-editor:
dependencies:
'@deepseek-ai/dsh-tool-str-replace-editor':
specifier: workspace:*
version: link:../../fs/tool-str-replace-editor
devDependencies:
'@deepseek-ai/cordis':
specifier: workspace:~
version: link:../../../vendor/cordis
packages/bundle/tmux-location:
dependencies:
'@deepseek-ai/dsh-tmux-context':
specifier: workspace:*
version: link:../../context/tmux-context
devDependencies:
'@deepseek-ai/cordis':
specifier: workspace:~
version: link:../../../vendor/cordis
packages/bundle/web-app:
dependencies:
'@deepseek-ai/dsh-agent-instructions':
@@ -8673,6 +8634,19 @@ importers:
specifier: ^18.2.0
version: 18.3.1([email protected])
packages/experimental/session-search:
dependencies:
'@deepseek-ai/dsh-session-query-sqlite':
specifier: workspace:*
version: link:../../session-query/session-query-sqlite
'@deepseek-ai/dsh-tool-session-query':
specifier: workspace:*
version: link:../tool-session-query
devDependencies:
'@deepseek-ai/cordis':
specifier: workspace:~
version: link:../../../vendor/cordis
packages/experimental/session-title-all-prompts-llm:
dependencies:
'@deepseek-ai/schemastery':
+1
View File
@@ -73,6 +73,7 @@ describe('release families', () => {
'@deepseek-ai/dsh-experimental-ptc-runtime-python',
'@deepseek-ai/dsh-experimental-ralph-bundle',
'@deepseek-ai/dsh-experimental-session-inspector',
'@deepseek-ai/dsh-experimental-session-search',
'@deepseek-ai/dsh-session-title-all-prompts-llm',
'@deepseek-ai/dsh-experimental-session-titles-bundle',
'@deepseek-ai/dsh-skill-badge',