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

Method add_agent

crates/opencode-session/src/message.rs:210–220  ·  view source on GitHub ↗
(&mut self, name: impl Into<String>)

Source from the content-addressed store, hash-verified

208 }
209
210 pub fn add_agent(&mut self, name: impl Into<String>) {
211 self.parts.push(MessagePart {
212 id: format!("prt_{}", uuid::Uuid::new_v4()),
213 part_type: PartType::Agent {
214 name: name.into(),
215 status: "pending".to_string(),
216 },
217 created_at: Utc::now(),
218 message_id: None,
219 });
220 }
221
222 pub fn add_subtask(&mut self, id: impl Into<String>, description: impl Into<String>) {
223 self.parts.push(MessagePart {

Callers 1

create_user_messageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected