refactor: consolidate nvim crates, extract server library, and update workspace dependencies

This commit is contained in:
Riz Ashraf committed 2026-10-04 01:42:59 +01:00
1 parent a083719cf1
commit 533adfd41b
53 files changed
+5967 -1230

No files matched your search

+26
View File
@@ -133,4 +133,30 @@ mod tests {
assert!(result.contains("line1"));
assert!(result.contains("line3"));
}
#[tokio::test]
async fn test_get_recent_logs_with_large_file() {
let dir = tempfile::tempdir().unwrap();
let state = Arc::new(MemoryState::new(dir.path().to_str().unwrap()));
let handler = GetRecentLogsHandler;
let log_file = dir.path().join("large_test.log");
let mut buffer = String::new();
for _ in 0..1000 {
buffer.push_str("line\n");
}
std::fs::write(&log_file, buffer).unwrap();
let args = serde_json::json!({
"file_path": log_file.to_str().unwrap()
});
let result = handler
.execute(args, state)
.await
.map_err(|e| format!("Failed to get recent logs: {}", e))
.unwrap();
assert!(result.contains("line"));
}
}