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

Method new

crates/opencode-session/src/prompt.rs:145–152  ·  view source on GitHub ↗
(session_state: Arc<RwLock<SessionStateManager>>)

Source from the content-addressed store, hash-verified

143
144impl SessionPrompt {
145 pub fn new(session_state: Arc<RwLock<SessionStateManager>>) -> Self {
146 Self {
147 state: Arc::new(Mutex::new(HashMap::new())),
148 session_state,
149 mcp_clients: None,
150 lsp_registry: None,
151 }
152 }
153
154 pub fn with_mcp_clients(mut self, clients: Arc<opencode_mcp::McpClientRegistry>) -> Self {
155 self.mcp_clients = Some(clients);

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected