localPathToUri-related at-codebase fixes
This commit is contained in:
parent
af36d82f41
commit
71f0f0fb04
2 changed files with 6 additions and 5 deletions
|
|
@ -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("<results>")[1]
|
||||
?.split("</results>")[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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue