Bug fix: deduplicate assistant messages (#2758)

We are treating assistant messages in a different way than other
messages which resulted in a duplicated history.

See #2698
This commit is contained in:
Ahmed Ibrahim
2025-08-27 01:29:16 -07:00
committed by GitHub
parent d0e06f74e2
commit 2d2f66f9c5
3 changed files with 150 additions and 120 deletions

View File

@@ -1780,11 +1780,6 @@ async fn try_run_turn(
return Ok(output);
}
ResponseEvent::OutputTextDelta(delta) => {
{
let mut st = sess.state.lock_unchecked();
st.history.append_assistant_text(&delta);
}
let event = Event {
id: sub_id.to_string(),
msg: EventMsg::AgentMessageDelta(AgentMessageDeltaEvent { delta }),