MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / simple

Method simple

crates/opencode-tool/src/tool.rs:266–273  ·  view source on GitHub ↗
(title: impl Into<String>, output: impl Into<String>)

Source from the content-addressed store, hash-verified

264
265impl ToolResult {
266 pub fn simple(title: impl Into<String>, output: impl Into<String>) -> Self {
267 Self {
268 title: title.into(),
269 output: output.into(),
270 metadata: Metadata::new(),
271 truncated: false,
272 }
273 }
274
275 pub fn with_metadata(mut self, key: impl Into<String>, value: serde_json::Value) -> Self {
276 self.metadata.insert(key.into(), value);

Callers 1

generate_slugMethod · 0.80

Calls 1

newFunction · 0.85

Tested by

no test coverage detected