test: hardcode gotoDefinition

This commit is contained in:
tomasz-io 2024-11-14 10:30:49 -08:00
parent a6ae78d7ca
commit 5de52c8c4f
2 changed files with 11 additions and 11 deletions

View file

@ -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;
}

View file

@ -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;