Fix: push all responses to forked agent entries
The final assistant response in run_with_backend wasn't being pushed to the backend — only intermediate step responses were. This meant the subconscious debug screen only showed the prompt, not the full conversation. Now push assistant response immediately after receiving it, before checking for next steps. Remove the duplicate push in the multi-step path. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
1f873140ae
commit
74f8952399
1 changed files with 2 additions and 1 deletions
|
|
@ -249,12 +249,13 @@ impl AutoAgent {
|
|||
dbglog!("[auto] {} response: {}",
|
||||
self.name, &text[..text.len().min(200)]);
|
||||
|
||||
backend.push_message(Message::assistant(&text)).await;
|
||||
|
||||
if next_step < self.steps.len() {
|
||||
if let Some(ref check) = bail_fn {
|
||||
check(next_step)?;
|
||||
}
|
||||
self.current_phase = self.steps[next_step].phase.clone();
|
||||
backend.push_message(Message::assistant(&text)).await;
|
||||
backend.push_message(
|
||||
Message::user(&self.steps[next_step].prompt)).await;
|
||||
next_step += 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue