Skip to content

Commit c67cde8

Browse files
committed
Removes not neccesary forced logic
1 parent 4f6f1a8 commit c67cde8

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

crates/code-agent-sdk/src/sdk/file_watcher.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -304,32 +304,6 @@ impl EventProcessor {
304304

305305
tracing::info!("📄 File created, sending didChangeWatchedFiles: {:?}", absolute_path);
306306
let _ = client.did_change_watched_files(params).await;
307-
308-
// 2. Force parsing by sending didOpen (cross-server way to guarantee indexing)
309-
if let Ok(content) = std::fs::read_to_string(&absolute_path) {
310-
// Determine language ID from file extension using ConfigManager
311-
let language_id = if let Some(ext) = absolute_path.extension().and_then(|ext| ext.to_str()) {
312-
crate::config::ConfigManager::get_language_for_extension(ext)
313-
.unwrap_or_else(|| "plaintext".to_string())
314-
} else {
315-
"plaintext".to_string()
316-
};
317-
318-
let open_params = lsp_types::DidOpenTextDocumentParams {
319-
text_document: lsp_types::TextDocumentItem {
320-
uri: absolute_uri.clone(),
321-
language_id: language_id.clone(),
322-
version: 1,
323-
text: content,
324-
},
325-
};
326-
327-
tracing::info!("📂 Forcing parse with didOpen ({}): {:?}", language_id, absolute_path);
328-
let _ = client.did_open(open_params).await;
329-
330-
// Mark as opened in workspace manager
331-
workspace_manager.mark_file_opened(absolute_path.clone());
332-
}
333307
}
334308
} else {
335309
tracing::info!("📄 File created but already open, skipping notification: {:?}", absolute_path);

0 commit comments

Comments
 (0)