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

Method assistant

crates/opencode-types/src/message.rs:107–116  ·  view source on GitHub ↗
(session_id: impl Into<String>)

Source from the content-addressed store, hash-verified

105 }
106
107 pub fn assistant(session_id: impl Into<String>) -> Self {
108 Self {
109 id: format!("msg_{}", uuid::Uuid::new_v4()),
110 session_id: session_id.into(),
111 role: MessageRole::Assistant,
112 parts: Vec::new(),
113 created_at: Utc::now(),
114 metadata: HashMap::new(),
115 }
116 }
117
118 pub fn get_text(&self) -> String {
119 self.parts

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected