fix(tui): route prompts by next-step capability

This commit is contained in:
_Kerman
2026-07-27 18:05:43 +08:00
parent a59ce0367c
commit f63d937496
21 changed files with 87 additions and 22 deletions

View File

@@ -31,6 +31,7 @@ function stubAgent(id: string): { agent: Agent; session: Session } {
session,
ctx: new Context(),
get status() { return status },
get acceptsNextStep() { return status === 'running' },
send: () => AgentMessageId('stub'),
followup: () => AgentMessageId('stub'),
steer: () => AgentMessageId('stub'),

View File

@@ -46,6 +46,7 @@ function stubAgentForSession(session: Session): StubAgent {
session,
ctx: new Context(),
get status() { return status },
get acceptsNextStep() { return status === 'running' },
send: () => AgentMessageId('stub'),
followup: () => AgentMessageId('stub'),
steer: () => AgentMessageId('stub'),

View File

@@ -30,6 +30,7 @@ function stubAgent(rawId: string, supplied?: Session): StubAgent {
options: {},
session,
get status() { return status },
get acceptsNextStep() { return status === 'running' },
ctx: new Context(),
send: () => AgentMessageId('stub'),
followup: () => AgentMessageId('stub'),