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

Method new

crates/opencode-provider/src/models.rs:107–112  ·  view source on GitHub ↗
(cache_path: PathBuf)

Source from the content-addressed store, hash-verified

105
106impl ModelsRegistry {
107 pub fn new(cache_path: PathBuf) -> Self {
108 Self {
109 data: Arc::new(RwLock::new(None)),
110 cache_path,
111 }
112 }
113
114 pub async fn get(&self) -> ModelsData {
115 let data = self.data.read().await;

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected