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

Method add_subtask

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

Source from the content-addressed store, hash-verified

220 }
221
222 pub fn add_subtask(&mut self, id: impl Into<String>, description: impl Into<String>) {
223 self.parts.push(MessagePart {
224 id: format!("prt_{}", uuid::Uuid::new_v4()),
225 part_type: PartType::Subtask {
226 id: id.into(),
227 description: description.into(),
228 status: "pending".to_string(),
229 },
230 created_at: Utc::now(),
231 message_id: None,
232 });
233 }
234
235 pub fn get_text(&self) -> String {
236 self.parts

Callers 1

create_user_messageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected