feat(coding-agent): expose deliverAs option in hook sendMessage() API

- pi.sendMessage(msg, options?) now accepts { triggerTurn?, deliverAs? }
- deliverAs: 'steer' (default) or 'followUp' controls delivery timing
- Update all mode handlers to pass options through
- Update file-trigger example to use new API
- Update CHANGELOG
This commit is contained in:
Mario Zechner 2026-01-02 23:56:51 +01:00
parent d404f8fcfa
commit 9d8230dfc6
8 changed files with 29 additions and 18 deletions

View file

@ -404,10 +404,10 @@ export class InteractiveMode {
hookRunner.initialize({
getModel: () => this.session.model,
sendMessageHandler: (message, triggerTurn) => {
sendMessageHandler: (message, options) => {
const wasStreaming = this.session.isStreaming;
this.session
.sendHookMessage(message, { triggerTurn })
.sendHookMessage(message, options)
.then(() => {
// For non-streaming cases with display=true, update UI
// (streaming cases update via message_end event)