mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-14 12:44:36 +00:00
Refactor LSP tools and add hover functionality
- Split diagnostics tool into separate lsp-diagnostics.ts file - Add new lsp-hover.ts tool for LSP hover information - Update tool exports and session integration - Remove old diagnostics.ts file 🤖 Generated with opencode Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
@@ -144,7 +144,7 @@ export namespace LSPClient {
|
||||
textDocument: {
|
||||
uri: `file://` + input.path,
|
||||
languageId,
|
||||
version: ++version,
|
||||
version: Date.now(),
|
||||
text,
|
||||
},
|
||||
});
|
||||
@@ -157,7 +157,7 @@ export namespace LSPClient {
|
||||
await connection.sendNotification("textDocument/didChange", {
|
||||
textDocument: {
|
||||
uri: `file://` + input.path,
|
||||
version: ++version,
|
||||
version: Date.now(),
|
||||
},
|
||||
contentChanges: [
|
||||
{
|
||||
@@ -181,7 +181,7 @@ export namespace LSPClient {
|
||||
event.properties.path === input.path &&
|
||||
event.properties.serverID === result.clientID
|
||||
) {
|
||||
log.info("refreshed diagnostics", input);
|
||||
log.info("got diagnostics", input);
|
||||
clearTimeout(timeout);
|
||||
unsub?.();
|
||||
resolve();
|
||||
@@ -190,6 +190,7 @@ export namespace LSPClient {
|
||||
}),
|
||||
new Promise<void>((resolve) => {
|
||||
timeout = setTimeout(() => {
|
||||
log.info("timed out refreshing diagnostics", input);
|
||||
unsub?.();
|
||||
resolve();
|
||||
}, 5000);
|
||||
|
||||
Reference in New Issue
Block a user