Merge remote-tracking branch 'origin/master' into codex/ask-user-question

# Conflicts:
#	docs/rfc/README.md
#	packages/ui/acp-agent/src/index.ts
This commit is contained in:
Yichen Jiang
2026-07-06 10:08:58 +08:00
217 changed files with 2924 additions and 1384 deletions

View File

@@ -488,6 +488,18 @@ describe('createStdioChat input', () => {
expect(exit).not.toHaveBeenCalled()
})
it('rejects new questions immediately after stdin has closed', async () => {
const { ctx, input, out } = await setup()
input.finish()
await new Promise(r => setImmediate(r))
const before = out.text()
const answer = ctx.userInteraction.ask({ question: 'Too late?' })
await expect(answer).rejects.toMatchObject({ code: 'ASK_ABORTED' })
expect(out.text()).toBe(before)
})
it('sends a typed line to an idle agent', async () => {
const { ctx, input } = await setup()
const agent = makeAgent('main', 'idle')