From 9472bb1e4562e64e0ab4752aecbf4b3f1cb723bd Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Wed, 9 Jul 2025 21:07:31 -0700 Subject: [PATCH] bug: satisfy IDE --- core/protocol/ide.ts | 3 +++ core/protocol/messenger/messageIde.ts | 9 +++++++++ core/util/filesystem.ts | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/core/protocol/ide.ts b/core/protocol/ide.ts index ba4cf4f88..c67b8c94a 100644 --- a/core/protocol/ide.ts +++ b/core/protocol/ide.ts @@ -10,6 +10,7 @@ import type { Problem, Range, RangeInFile, + SignatureHelp, TerminalOptions, Thread, } from "../"; @@ -82,6 +83,8 @@ export type ToIdeFromWebviewOrCoreProtocol = { getFileStats: [{ files: string[] }, FileStatsMap]; gotoDefinition: [{ location: Location }, RangeInFile[]]; + gotoTypeDefinition: [{ location: Location }, RangeInFile[]]; + getSignatureHelp: [{ location: Location }, SignatureHelp | null]; getControlPlaneSessionInfo: [ { silent: boolean; useOnboarding: boolean }, diff --git a/core/protocol/messenger/messageIde.ts b/core/protocol/messenger/messageIde.ts index 30d9b8177..2365117c0 100644 --- a/core/protocol/messenger/messageIde.ts +++ b/core/protocol/messenger/messageIde.ts @@ -13,6 +13,7 @@ import type { Problem, Range, RangeInFile, + SignatureHelp, TerminalOptions, Thread, } from "../.."; @@ -45,6 +46,14 @@ export class MessageIde implements IDE { return this.request("gotoDefinition", { location }); } + async gotoTypeDefinition(location: Location): Promise { + return this.request("gotoTypeDefinition", { location }); + } + + async getSignatureHelp(location: Location): Promise { + return this.request("getSignatureHelp", { location }); + } + onDidChangeActiveTextEditor(callback: (fileUri: string) => void): void { this.on("didChangeActiveTextEditor", (data) => callback(data.filepath)); } diff --git a/core/util/filesystem.ts b/core/util/filesystem.ts index f415e5e86..959ea939f 100644 --- a/core/util/filesystem.ts +++ b/core/util/filesystem.ts @@ -13,6 +13,7 @@ import { Problem, Range, RangeInFile, + SignatureHelp, TerminalOptions, Thread, ToastType, @@ -44,6 +45,14 @@ class FileSystemIde implements IDE { return Promise.resolve([]); } + gotoTypeDefinition(location: Location): Promise { + return Promise.resolve([]); + } + + getSignatureHelp(location: Location): Promise { + return Promise.resolve(null); + } + onDidChangeActiveTextEditor(callback: (fileUri: string) => void): void { return; }