Skip to main content
Glama

CodeGraph CLI MCP Server

by Jakedismo
delta_processor.rs1.8 kB
use codegraph_core::{traits::DeltaProcessor, Delta, Result, UpdatePayload}; use crossbeam_channel::{Receiver, Sender}; pub struct DeltaProcessorImpl; #[async_trait::async_trait] impl DeltaProcessor for DeltaProcessorImpl { async fn process(&self, rx: Receiver<UpdatePayload>, tx: Sender<Delta>) -> Result<()> { for payload in rx { let delta = match payload.event { codegraph_core::ChangeEvent::Modified(path) => { // In a real implementation, we would fetch the old content from the graph // and compute a diff. For now, we'll just return the new content as the delta. let changes = payload .content .unwrap_or_default() .lines() .map(|s| s.to_string()) .collect(); Delta { file_path: path, changes, } } codegraph_core::ChangeEvent::Created(path) => { let changes = payload .content .unwrap_or_default() .lines() .map(|s| s.to_string()) .collect(); Delta { file_path: path, changes, } } codegraph_core::ChangeEvent::Deleted(path) => Delta { file_path: path, changes: vec![], }, }; tx.send(delta) .map_err(|e| codegraph_core::CodeGraphError::Threading(e.to_string()))?; } Ok(()) } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jakedismo/codegraph-rust'

If you have feedback or need assistance with the MCP directory API, please join our Discord server