fix(apiproxy): stop projecting injected context as user steering

next-step items now split by origin: user-origin messages keep the
'steering' placement, while agent.inject context (approval notices, task
completion notices, attached snapshots) carries a new 'context' placement
that no surface renders until it is claimed as a durable user/message
context card. Widen the placement unions on the wire and in the client
runtime, add a projection test case, and document the split in the
apiproxy/ui-conversation READMEs and the web-steer chrome agent note.
This commit is contained in:
_Kerman
2026-08-03 16:15:07 +08:00
parent 8171936082
commit 3c160e137d
10 changed files with 36 additions and 8 deletions

View File

@@ -786,7 +786,14 @@ export function createApiProxy(ctx: Context, defaults: ApiProxyDefaults): ApiPro
}
return [
...project('next-turn').map(message => ({ id: message.id, placement: 'queued' as const, message })),
...project('next-step').map(message => ({ id: message.id, placement: 'steering' as const, message })),
...project('next-step').map(message => ({
id: message.id,
// Only user-origin messages are steering; injected context (approval
// notices, task completion, attached snapshots) is not a user action
// and must not render as a pending steering bubble.
placement: message.source.kind === 'user' ? 'steering' as const : 'context' as const,
message,
})),
]
}