fix(sdk): mount task controls for subagents

This commit is contained in:
Dudu-0223
2026-07-24 16:33:44 +08:00
committed by imccyu
parent 43151ed9c0
commit 0a95ad8cc0
5 changed files with 19 additions and 5 deletions
+10
View File
@@ -204,6 +204,16 @@ describe('SdkProject and ProjectEditSession', () => {
expect(project.cordis.entry('llm-deepseek')?.config).not.toHaveProperty('models')
})
it.each(['spawn', 'fork'] as const)('mounts Task controls for %s subagents', async (option) => {
const project = await createCommitted([selection('subagent', [option])])
expect(project.cordis.entry('tasks')?.name).toBe('@deepseek-ai/dsh-tasks')
expect(project.cordis.entry('tool-tasks')?.name).toBe('@deepseek-ai/dsh-tool-tasks')
expect(project.packageManifest().dependencies).toMatchObject({
'@deepseek-ai/dsh-tasks': '^0.0.1',
'@deepseek-ai/dsh-tool-tasks': '^0.0.1',
})
})
it('round-trips embed app projects without a front-door Cordis config entry', async () => {
const root = await mkdtemp(join(tmpdir(), 'dsh-embed-app-'))
temporary.push(root)