Skip to content

Commit

Permalink
fix: parse pinned file paths correctly
Browse files Browse the repository at this point in the history
Use vscode.Uri.file to parse file paths, rather than vscode.Uri.path.
  • Loading branch information
apotterri committed Oct 17, 2024
1 parent 8a697e0 commit d7561af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webviews/chatSearchWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d7561af

Please sign in to comment.