test: align merged suites with master's cancel cause and optional welcome
workspace-context's abort-tool test uses agent.cancel({kind:'user'}) (master's
AgentCancelCause shape); tui-demo forwards no welcome when none is configured.
This commit is contained in:
2 files changed
+3
-2
No files matched your search
@@ -1699,7 +1699,7 @@ describe('dynamic nested workspace context injection', () => {
|
||||
description: 'Abort the current test step.',
|
||||
parameters: {},
|
||||
async execute() {
|
||||
;(agent as unknown as { currentAbort?: AbortController }).currentAbort?.abort('test abort')
|
||||
agent.cancel({ kind: 'user' })
|
||||
return [{ type: 'text', text: 'aborted' }]
|
||||
},
|
||||
}))
|
||||
|
||||
@@ -88,7 +88,8 @@ describe('dsh-tui-demo app', () => {
|
||||
})
|
||||
|
||||
expect(calls[2]?.config).toEqual({ root: './.sessions' })
|
||||
expect(calls[4]?.config).toEqual({ welcome: 'ready.', sessionId: 'persisted-session' })
|
||||
// No configured welcome forwards none: the TUI banner sweeps in without a subtitle.
|
||||
expect(calls[4]?.config).toEqual({ sessionId: 'persisted-session' })
|
||||
expect((calls[5]?.config as { agents: Array<Record<string, unknown>> }).agents[0]).toMatchObject({
|
||||
id: 'main',
|
||||
resumeSessionId: 'persisted-session',
|
||||
|
||||
Reference in New Issue
Block a user