bug: satisfy IDE
This commit is contained in:
parent
367e6672ca
commit
9472bb1e45
3 changed files with 21 additions and 0 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
|
|
@ -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<RangeInFile[]> {
|
||||
return this.request("gotoTypeDefinition", { location });
|
||||
}
|
||||
|
||||
async getSignatureHelp(location: Location): Promise<SignatureHelp | null> {
|
||||
return this.request("getSignatureHelp", { location });
|
||||
}
|
||||
|
||||
onDidChangeActiveTextEditor(callback: (fileUri: string) => void): void {
|
||||
this.on("didChangeActiveTextEditor", (data) => callback(data.filepath));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<RangeInFile[]> {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
|
||||
getSignatureHelp(location: Location): Promise<SignatureHelp | null> {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
onDidChangeActiveTextEditor(callback: (fileUri: string) => void): void {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue