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

Function wait_for_initialize

src/diagnostics/lsp/client.rs:323–334  ·  view source on GitHub ↗
(reader: &mut BufReader<tokio::process::ChildStdout>)

Source from the content-addressed store, hash-verified

321}
322
323async fn wait_for_initialize(reader: &mut BufReader<tokio::process::ChildStdout>) -> Result<()> {
324 loop {
325 let Some(message) = read_message(reader).await? else {
326 return Err(TraceDecayError::Config {
327 message: "LSP server closed before initialize response".to_string(),
328 });
329 };
330 if message.id == Some(json!(1)) {
331 return Ok(());
332 }
333 }
334}
335
336async fn write_message(stdin: &mut tokio::process::ChildStdin, value: Value) -> Result<()> {
337 let body = serde_json::to_vec(&value).map_err(|e| TraceDecayError::Config {

Callers 1

start_with_timeoutsMethod · 0.85

Calls 1

read_messageFunction · 0.70

Tested by

no test coverage detected