mirror of
https://github.com/block/buzz.git
synced 2026-10-30 05:51:46 +00:00
fix(buzz-agent): mark steered messages with with_steer()
goose's own steer path sets metadata.steer (agent.rs:540) and its ACP surface republishes it as _meta.goose.steer. buzz-agent queued steers as plain user messages, so nothing downstream could tell a mid-turn steer apart from the user simply sending another message -- which is the one distinction the flag exists to preserve. buzz-acp does not read it today; this keeps the conversation record honest for anything that later does. Co-authored-by: Michael Neale <michael.neale@gmail.com> Signed-off-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
@@ -906,8 +906,18 @@ async fn steer(app: &Arc<App>, id: Value, params: Value, wire_tx: &WireSender) {
|
||||
};
|
||||
|
||||
let message_id = format!("steer_{}", uuid_like());
|
||||
// `with_steer()` marks the message so downstream consumers can tell a
|
||||
// steer apart from an ordinary user turn -- goose's own steer path sets
|
||||
// it (`agent.rs:540`), and its ACP surface republishes it as
|
||||
// `_meta.goose.steer`. buzz-acp does not read it today, but an unmarked
|
||||
// steer is indistinguishable from the user having simply sent another
|
||||
// message, which is exactly the distinction the flag exists to keep.
|
||||
steers
|
||||
.push(goose_provider_types::conversation::message::Message::user().with_text(text))
|
||||
.push(
|
||||
goose_provider_types::conversation::message::Message::user()
|
||||
.with_text(text)
|
||||
.with_steer(),
|
||||
)
|
||||
.await;
|
||||
|
||||
wire::send(
|
||||
|
||||
Reference in New Issue
Block a user