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

Method with_system_prompt

crates/opencode-agent/src/message.rs:92–96  ·  view source on GitHub ↗
(prompt: impl Into<String>)

Source from the content-addressed store, hash-verified

90 }
91
92 pub fn with_system_prompt(prompt: impl Into<String>) -> Self {
93 let mut conv = Self::new();
94 conv.messages.push(AgentMessage::system(prompt));
95 conv
96 }
97
98 pub fn add_user_message(&mut self, content: impl Into<String>) {
99 self.messages.push(AgentMessage::user(content));

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected