refactor: remove unnecessary Arc<Mutex> from tool execution pipeline (#7979)

Signed-off-by: rabi <ramishra@redhat.com>
Co-authored-by: jh-block <jhugo@block.xyz>
This commit is contained in:
Rabi Mishra
2026-03-18 15:05:02 +05:30
committed by GitHub
parent 4e4c435339
commit 8d714a04c8
4 changed files with 53 additions and 73 deletions
+7 -7
View File
@@ -774,7 +774,6 @@ impl Message {
}))
}
/// Add a tool response to the message
pub fn with_tool_response<S: Into<String>>(
self,
id: S,
@@ -783,15 +782,16 @@ impl Message {
self.with_content(MessageContent::tool_response(id, result))
}
pub fn with_tool_response_with_metadata<S: Into<String>>(
self,
pub fn add_tool_response_with_metadata<S: Into<String>>(
&mut self,
id: S,
result: ToolResult<CallToolResult>,
metadata: Option<&ProviderMetadata>,
) -> Self {
self.with_content(MessageContent::tool_response_with_metadata(
id, result, metadata,
))
) {
self.content
.push(MessageContent::tool_response_with_metadata(
id, result, metadata,
));
}
/// Add an action required message for tool confirmation