refactor(agent): unify sourced message delivery

This commit is contained in:
_Kerman
2026-07-24 22:38:50 +08:00
parent 009d113e0e
commit 992cf894af
197 changed files with 1890 additions and 2132 deletions

View File

@@ -516,7 +516,10 @@ describe('/plan', () => {
text: 'Entering plan mode (applies from the next step). Use /plan off to leave.',
})
expect(ctx.planMode.get(messageAgent)).toEqual({ active: false, pending: true })
expect(messageSteer).toHaveBeenCalledExactlyOnceWith([{ type: 'text', text: 'draft the migration' }])
expect(messageSteer).toHaveBeenCalledExactlyOnceWith({
content: [{ type: 'text', text: 'draft the migration' }],
source: { kind: 'user' },
})
})
it('leaves active plan mode, cancels a pending entry, and treats inactive exit as idempotent', async () => {