From d7561af87f88f79621a7de8bf1de0b96611423a6 Mon Sep 17 00:00:00 2001 From: Alan Potter Date: Thu, 17 Oct 2024 11:08:50 -0400 Subject: [PATCH] fix: parse pinned file paths correctly Use vscode.Uri.file to parse file paths, rather than vscode.Uri.path. --- src/webviews/chatSearchWebview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webviews/chatSearchWebview.ts b/src/webviews/chatSearchWebview.ts index a122e3fa..e32e1747 100644 --- a/src/webviews/chatSearchWebview.ts +++ b/src/webviews/chatSearchWebview.ts @@ -72,7 +72,7 @@ export default class ChatSearchWebview { let contentLength = r.content?.length; if (!r.content) { assert(r.uri, `doPinFiles, ${r.name}: no content, no uri`); - const u: vscode.Uri = vscode.Uri.parse(r.uri); + const u: vscode.Uri = vscode.Uri.file(r.uri.toString().replace(/file:\/\//g, '')); const stat = await vscode.workspace.fs.stat(u); contentLength = stat.size; if (contentLength < maxPinnedFileSize) {