MCPcopy Index your code
hub / github.com/AI45Lab/Code / push_tool_result_message

Function push_tool_result_message

core/src/agent/tool_result_runtime.rs:101–117  ·  view source on GitHub ↗
(
    state: &mut ExecutionLoopState,
    tool_id: &str,
    output: &str,
    is_error: bool,
    images: Vec<Attachment>,
)

Source from the content-addressed store, hash-verified

99}
100
101pub(super) fn push_tool_result_message(
102 state: &mut ExecutionLoopState,
103 tool_id: &str,
104 output: &str,
105 is_error: bool,
106 images: Vec<Attachment>,
107) {
108 if images.is_empty() {
109 state
110 .messages
111 .push(Message::tool_result(tool_id, output, is_error));
112 } else {
113 state.messages.push(Message::tool_result_with_images(
114 tool_id, output, &images, is_error,
115 ));
116 }
117}
118
119#[cfg(test)]
120mod tests {

Callers 2

complete_tool_callMethod · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected