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

Method add_text

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

Source from the content-addressed store, hash-verified

136 }
137
138 pub fn add_text(&mut self, text: impl Into<String>) {
139 self.parts.push(MessagePart {
140 id: format!("prt_{}", uuid::Uuid::new_v4()),
141 part_type: PartType::Text { text: text.into(), synthetic: None, ignored: None },
142 created_at: Utc::now(),
143 message_id: None,
144 });
145 }
146
147 pub fn add_reasoning(&mut self, text: impl Into<String>) {
148 self.parts.push(MessagePart {

Callers 11

stream_messageFunction · 0.80
session_promptFunction · 0.80
execute_shellFunction · 0.80
execute_commandFunction · 0.80
create_user_messageMethod · 0.80
add_mcp_resource_partMethod · 0.80
add_data_url_partMethod · 0.80
add_file_url_partMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected