From 9706f3e5f3285fb29705970632b2fc969d506a51 Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Thu, 24 Sep 2026 20:36:52 +0800 Subject: [PATCH] test(web): cover the subagent-session mapping in the schedule editor The new code joins the update-result union, so the exhaustive switch gained a branch no test reached; the table-driven mapping test now names it. --- packages/bundle/web-app/cordis.patch.yml | 12 +++++------- packages/bundle/web-app/presets/cordis.patch.yml | 2 ++ packages/bundle/web-app/presets/ptc.patch.yml | 2 ++ packages/bundle/web-app/presets/standard.patch.yml | 2 ++ .../ui-schedule/tests/task-timing.client.spec.tsx | 1 + pnpm-lock.yaml | 3 +++ python/sdk-runtime/package.json | 1 + 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/bundle/web-app/cordis.patch.yml b/packages/bundle/web-app/cordis.patch.yml index b0663c968a..b35f082f8f 100644 --- a/packages/bundle/web-app/cordis.patch.yml +++ b/packages/bundle/web-app/cordis.patch.yml @@ -114,13 +114,11 @@ name: '@deepseek-ai/dsh-api-workspace-files' # Durable Host-wide reminders. The Schedule service owns the task store and - # delivers each due occurrence as a follow-up in its original Session; - # `time-context` supplies the current time, browser zone, and elapsed time - # the model needs to resolve an unqualified date or time. The browser half - # is the `ui-schedule` row below. - - id: time-context - name: '@deepseek-ai/dsh-time-context' - + # delivers each due occurrence as a follow-up in its original Session; the + # browser half is the `ui-schedule` row below. The clock reading that + # resolves an unqualified date or time is a preset row (`time-context` in + # the `standard`, `cordis`, and `ptc` preset patches), so it reaches exactly + # the presets that ship the reminder tools. - id: schedule name: '@deepseek-ai/dsh-schedule' diff --git a/packages/bundle/web-app/presets/cordis.patch.yml b/packages/bundle/web-app/presets/cordis.patch.yml index 15f537e857..d8b3159df8 100644 --- a/packages/bundle/web-app/presets/cordis.patch.yml +++ b/packages/bundle/web-app/presets/cordis.patch.yml @@ -20,6 +20,8 @@ name: '@deepseek-ai/dsh-agent-instructions' config: maxBytes: 65536 + - id: time-context + name: '@deepseek-ai/dsh-time-context' - id: tool-bash name: '@deepseek-ai/dsh-tool-bash' disabled: !!js process.platform === 'win32' diff --git a/packages/bundle/web-app/presets/ptc.patch.yml b/packages/bundle/web-app/presets/ptc.patch.yml index 391facbb9f..a65a389da2 100644 --- a/packages/bundle/web-app/presets/ptc.patch.yml +++ b/packages/bundle/web-app/presets/ptc.patch.yml @@ -17,6 +17,8 @@ name: '@deepseek-ai/dsh-agent-instructions' config: maxBytes: 65536 + - id: time-context + name: '@deepseek-ai/dsh-time-context' - id: tool-bash name: '@deepseek-ai/dsh-tool-bash' disabled: !!js process.platform === 'win32' diff --git a/packages/bundle/web-app/presets/standard.patch.yml b/packages/bundle/web-app/presets/standard.patch.yml index 3470ee4898..94ad6df477 100644 --- a/packages/bundle/web-app/presets/standard.patch.yml +++ b/packages/bundle/web-app/presets/standard.patch.yml @@ -17,6 +17,8 @@ name: '@deepseek-ai/dsh-agent-instructions' config: maxBytes: 65536 + - id: time-context + name: '@deepseek-ai/dsh-time-context' - id: tool-bash name: '@deepseek-ai/dsh-tool-bash' disabled: !!js process.platform === 'win32' diff --git a/packages/client/ui-schedule/tests/task-timing.client.spec.tsx b/packages/client/ui-schedule/tests/task-timing.client.spec.tsx index a49e29eb14..846a0a6dd1 100644 --- a/packages/client/ui-schedule/tests/task-timing.client.spec.tsx +++ b/packages/client/ui-schedule/tests/task-timing.client.spec.tsx @@ -174,6 +174,7 @@ describe('timingError', () => { ['schedule_conflict', 'timing.conflict'], ['schedule_ended', 'timing.inactive'], ['schedule_not_found', 'timing.notFound'], + ['subagent_session', 'timing.subagentSession'], ['invalid_time_zone', 'timing.invalidZone'], ['not_future', 'timing.notFuture'], ['frequency_too_high', 'timing.invalidInterval'], diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44a8588ec2..75ebe1c2c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14184,6 +14184,9 @@ importers: '@deepseek-ai/dsh-terminal-bash': specifier: workspace:* version: link:../../packages/terminal/terminal-bash + '@deepseek-ai/dsh-time-context': + specifier: workspace:* + version: link:../../packages/context/time-context '@deepseek-ai/dsh-timeout': specifier: workspace:* version: link:../../packages/util/timeout diff --git a/python/sdk-runtime/package.json b/python/sdk-runtime/package.json index 095d79410c..1e63e17605 100644 --- a/python/sdk-runtime/package.json +++ b/python/sdk-runtime/package.json @@ -124,6 +124,7 @@ "@deepseek-ai/dsh-system-prompt": "workspace:*", "@deepseek-ai/dsh-terminal": "workspace:*", "@deepseek-ai/dsh-terminal-bash": "workspace:*", + "@deepseek-ai/dsh-time-context": "workspace:*", "@deepseek-ai/dsh-timeout": "workspace:*", "@deepseek-ai/dsh-token-meter": "workspace:*", "@deepseek-ai/dsh-tool-ask-user": "workspace:*",