Skip to content

Commit a7d3819

Browse files
authored
fix(lsp): use file_path parameter for mcpls 0.3.4 compatibility (#1537)
mcpls 0.3.4 renamed the path parameter to file_path in get_diagnostics and get_hover tool calls. Update both lsp_hooks/diagnostics.rs and lsp_hooks/hover.rs to use the correct parameter name, fixing ErrorCode(-32602) on every diagnostics-on-save and hover-on-read call. Closes #1531
1 parent 6c8e3fc commit a7d3819

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/zeph-core/src/lsp_hooks/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub(super) async fn fetch_diagnostics(
6666
sanitizer: &ContentSanitizer,
6767
) -> Option<LspNote> {
6868
let timeout = std::time::Duration::from_secs(config.call_timeout_secs);
69-
let args = serde_json::json!({ "path": file_path });
69+
let args = serde_json::json!({ "file_path": file_path });
7070

7171
let call_result = match tokio::time::timeout(
7272
timeout,

crates/zeph-core/src/lsp_hooks/hover.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub(super) async fn fetch_hover(
7979
let mut entries: Vec<String> =
8080
futures::stream::iter(positions.iter().map(|(line, character)| {
8181
let args = serde_json::json!({
82-
"path": file_path,
82+
"file_path": file_path,
8383
"line": line,
8484
"character": character,
8585
});

0 commit comments

Comments
 (0)