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

Function get_config

crates/opencode-server/src/routes.rs:2419–2422  ·  view source on GitHub ↗
(State(_state): State<Arc<ServerState>>)

Source from the content-addressed store, hash-verified

2417static CONFIG_STATE: Lazy<RwLock<AppConfig>> = Lazy::new(|| RwLock::new(AppConfig::default()));
2418
2419async fn get_config(State(_state): State<Arc<ServerState>>) -> Result<Json<AppConfig>> {
2420 let config = CONFIG_STATE.read().await;
2421 Ok(Json(config.clone()))
2422}
2423
2424async fn patch_config(
2425 State(state): State<Arc<ServerState>>,

Callers

nothing calls this directly

Calls 2

readMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected