diff --git a/core/index.d.ts b/core/index.d.ts index eb0de41d5..470b0eed9 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -49,13 +49,13 @@ export interface IndexingProgressUpdate { desc: string; shouldClearIndexes?: boolean; status: - | "loading" - | "indexing" - | "done" - | "failed" - | "paused" - | "disabled" - | "cancelled"; + | "loading" + | "indexing" + | "done" + | "failed" + | "paused" + | "disabled" + | "cancelled"; debugInfo?: string; } @@ -91,7 +91,7 @@ type RequiredLLMOptions = export interface ILLM extends Omit, - Required> { + Required> { get providerName(): string; get underlyingProviderName(): string; @@ -773,10 +773,10 @@ export interface IDE { getCurrentFile(): Promise< | undefined | { - isUntitled: boolean; - path: string; - contents: string; - } + isUntitled: boolean; + path: string; + contents: string; + } >; getPinnedFiles(): Promise; @@ -814,6 +814,7 @@ export interface IDE { // LSP gotoDefinition(location: Location): Promise; + gotoTypeDefinition(location: Location): Promise; // Callbacks onDidChangeActiveTextEditor(callback: (fileUri: string) => void): void; @@ -955,11 +956,11 @@ export interface CustomCommand { export interface Prediction { type: "content"; content: - | string - | { - type: "text"; - text: string; - }[]; + | string + | { + type: "text"; + text: string; + }[]; } export interface ToolExtras { @@ -1455,9 +1456,9 @@ export interface Config { embeddingsProvider?: EmbeddingsProviderDescription | ILLM; /** The model that Continue will use for tab autocompletions. */ tabAutocompleteModel?: - | CustomLLM - | JSONModelDescription - | (CustomLLM | JSONModelDescription)[]; + | CustomLLM + | JSONModelDescription + | (CustomLLM | JSONModelDescription)[]; /** Options for tab autocomplete */ tabAutocompleteOptions?: Partial; /** UI styles customization */ @@ -1551,9 +1552,9 @@ export type PackageDetailsSuccess = PackageDetails & { export type PackageDocsResult = { packageInfo: ParsedPackageInfo; } & ( - | { error: string; details?: never } - | { details: PackageDetailsSuccess; error?: never } -); + | { error: string; details?: never } + | { details: PackageDetailsSuccess; error?: never } + ); export interface TerminalOptions { reuseTerminal?: boolean; diff --git a/extensions/vscode/src/VsCodeIde.ts b/extensions/vscode/src/VsCodeIde.ts index 5ca51d183..a9ea5d9c6 100644 --- a/extensions/vscode/src/VsCodeIde.ts +++ b/extensions/vscode/src/VsCodeIde.ts @@ -88,6 +88,17 @@ class VsCodeIde implements IDE { return result; } + async gotoTypeDefinition(location: Location): Promise { + const result = await executeGotoProvider({ + uri: vscode.Uri.parse(location.filepath), + line: location.position.line, + character: location.position.character, + name: "vscode.executeTypeDefinitionProvider", + }); + + return result; + } + onDidChangeActiveTextEditor(callback: (uri: string) => void): void { vscode.window.onDidChangeActiveTextEditor((editor) => { if (editor) {