MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / uninstall_from_codex

Function uninstall_from_codex

rust-core/src/main.rs:757–777  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

755}
756
757fn uninstall_from_codex() -> Result<(), Box<dyn std::error::Error>> {
758 let config_path = codex_config_path();
759 if config_path.exists() {
760 let content = std::fs::read_to_string(&config_path)?;
761 let header = "[mcp_servers.codeseek]";
762 if content.contains(header) {
763 let start = content.find(header).unwrap();
764 let end = content[start..]
765 .find("\n[")
766 .map(|i| start + i)
767 .unwrap_or(content.len());
768 let mut updated = content[..start].to_string();
769 if end < content.len() {
770 updated.push_str(&content[end..]);
771 }
772 std::fs::write(&config_path, updated.trim())?;
773 println!(" ✓ Removed from {}", config_path.display());
774 }
775 }
776 Ok(())
777}

Callers 1

mainFunction · 0.85

Calls 2

codex_config_pathFunction · 0.85
to_stringMethod · 0.80

Tested by

no test coverage detected