MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / add_tool_result

Method add_tool_result

crates/opencode-agent/src/message.rs:106–119  ·  view source on GitHub ↗
(
        &mut self,
        tool_call_id: impl Into<String>,
        name: impl Into<String>,
        content: impl Into<String>,
        is_error: bool,
    )

Source from the content-addressed store, hash-verified

104 }
105
106 pub fn add_tool_result(
107 &mut self,
108 tool_call_id: impl Into<String>,
109 name: impl Into<String>,
110 content: impl Into<String>,
111 is_error: bool,
112 ) {
113 self.messages.push(AgentMessage::tool_result(
114 tool_call_id,
115 name,
116 content,
117 is_error,
118 ));
119 }
120
121 pub fn to_provider_messages(&self) -> Vec<opencode_provider::Message> {
122 self.messages

Callers 2

executeMethod · 0.45
execute_subsessionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected