History

Temporarily restore the old attach_tool_results implementation

Thinking models are broken with the reverted change, but I'd still like to not do it this way.

Nathan Sobo committed 1 year ago

Commit 01f9bff1 parent 0a9e5e41 file · +3 −2Browse files

Unified · Split

crates/agent/src/thread.rs+3−2
@@ -1612,8 +1612,9 @@ impl Thread { · 1611 unmodified lines
16121612
16131613 /// Insert an empty message to be populated with tool results upon send.
16141614 pub fn attach_tool_results(&mut self, cx: &mut Context<Self>) {
1615− self.insert_message(Role::User, vec![], cx);
1616− self.auto_capture_telemetry(cx);
1615+ // todo!(Before merging, figure out it's necessary to do this as a user message - fails with "thinking" model)
1616+ // Insert a user message to contain the tool results.
1617+ self.insert_user_message("Here are the tool results.", Vec::new(), None, cx);
16171618 }
16181619
16191620 /// Cancels the last pending completion, if there are any pending.