test: hardcode gotoDefinition
This commit is contained in:
parent
a6ae78d7ca
commit
5de52c8c4f
2 changed files with 11 additions and 11 deletions
|
|
@ -90,15 +90,15 @@ export class RootPathContextService {
|
|||
return snippets;
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
query.matches(node).map(async (match) => {
|
||||
for (const item of match.captures) {
|
||||
const endPosition = item.node.endPosition;
|
||||
const newSnippets = await this.getSnippets(filepath, endPosition);
|
||||
snippets.push(...newSnippets);
|
||||
}
|
||||
}),
|
||||
);
|
||||
const queries = query.matches(node).map(async (match) => {
|
||||
for (const item of match.captures) {
|
||||
const endPosition = item.node.endPosition;
|
||||
const newSnippets = await this.getSnippets(filepath, endPosition);
|
||||
snippets.push(...newSnippets);
|
||||
}
|
||||
});
|
||||
|
||||
await Promise.all(queries);
|
||||
|
||||
return snippets;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { GetGhTokenArgs } from "../protocol/ide.js";
|
|||
import { getContinueGlobalPath } from "./paths.js";
|
||||
|
||||
class FileSystemIde implements IDE {
|
||||
constructor(private readonly workspaceDir: string) { }
|
||||
constructor(private readonly workspaceDir: string) {}
|
||||
showToast(
|
||||
type: ToastType,
|
||||
message: string,
|
||||
|
|
@ -36,7 +36,7 @@ class FileSystemIde implements IDE {
|
|||
}
|
||||
|
||||
gotoDefinition(location: Location): Promise<RangeInFile[]> {
|
||||
throw new Error("Method not implemented.");
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
onDidChangeActiveTextEditor(callback: (filepath: string) => void): void {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue