MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / doctor_check_settings

Function doctor_check_settings

src/agents/zed.rs:185–212  ·  view source on GitHub ↗

Check Zed settings.json has tracedecay context server registered.

(dc: &mut DoctorCounters, home: &Path)

Source from the content-addressed store, hash-verified

183
184/// Check Zed settings.json has tracedecay context server registered.
185fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) {
186 let settings_path = zed_config_dir(home).join("settings.json");
187
188 if !settings_path.exists() {
189 dc.warn(&format!(
190 "{} not found — run `tracedecay install --agent zed` if you use Zed",
191 settings_path.display()
192 ));
193 return;
194 }
195
196 let settings = load_jsonc_file(&settings_path);
197 let server = settings
198 .get("context_servers")
199 .and_then(|v| v.get("tracedecay"));
200
201 if server.and_then(|v| v.as_object()).is_some() {
202 dc.pass(&format!(
203 "Context server registered in {}",
204 settings_path.display()
205 ));
206 } else {
207 dc.fail(&format!(
208 "Context server NOT registered in {} — run `tracedecay install --agent zed`",
209 settings_path.display()
210 ));
211 }
212}

Callers 1

healthcheckMethod · 0.70

Calls 6

zed_config_dirFunction · 0.85
load_jsonc_fileFunction · 0.85
existsMethod · 0.80
warnMethod · 0.80
passMethod · 0.80
failMethod · 0.80

Tested by

no test coverage detected