diff --git a/core/context/retrieval/repoMapRequest.ts b/core/context/retrieval/repoMapRequest.ts index 5637019ad..5a4f9be2a 100644 --- a/core/context/retrieval/repoMapRequest.ts +++ b/core/context/retrieval/repoMapRequest.ts @@ -2,6 +2,7 @@ import { Chunk, ContinueConfig, IDE, ILLM } from "../.."; import { getModelByRole } from "../../config/util"; import generateRepoMap from "../../util/generateRepoMap"; import { renderChatMessage } from "../../util/messageContent"; +import { localPathToUri } from "../../util/pathToUri"; const SUPPORTED_MODEL_TITLE_FAMILIES = [ "claude-3", @@ -72,7 +73,7 @@ This is the question that you should select relevant files for: "${input}"`; return []; } - const fileUris = content + const filepaths = content .split("")[1] ?.split("")[0] ?.split("\n") @@ -80,8 +81,9 @@ This is the question that you should select relevant files for: "${input}"`; .map((uri) => uri.trim()); const chunks = await Promise.all( - fileUris.map(async (uri) => { - const content = await ide.readFile(uri); + filepaths.map(async (filepath) => { + const uri = localPathToUri(filepath); + const content = await ide.readFile(filepath); const lineCount = content.split("\n").length; const chunk: Chunk = { digest: uri, diff --git a/core/indexing/LanceDbIndex.ts b/core/indexing/LanceDbIndex.ts index 2b2f23a77..168a4ff07 100644 --- a/core/indexing/LanceDbIndex.ts +++ b/core/indexing/LanceDbIndex.ts @@ -24,7 +24,6 @@ import { } from "./types"; import type * as LanceType from "vectordb"; -import { localPathToUri } from "../util/pathToUri"; interface LanceDbRow { uuid: string; @@ -499,7 +498,7 @@ export class LanceDbIndex implements CodebaseIndex { return data.map((d) => { return { digest: d.cacheKey, - filepath: localPathToUri(d.path), + filepath: d.path, startLine: d.startLine, endLine: d.endLine, index: 0,