From 406e141196fa648a2f85ed1f24c13e70f0367642 Mon Sep 17 00:00:00 2001 From: wwayne Date: Fri, 24 May 2024 16:09:59 +0800 Subject: [PATCH] navigate url --- clients/vscode/src/ChatViewProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/vscode/src/ChatViewProvider.ts b/clients/vscode/src/ChatViewProvider.ts index 765307a0d4a2..1ce0d72ae3cb 100644 --- a/clients/vscode/src/ChatViewProvider.ts +++ b/clients/vscode/src/ChatViewProvider.ts @@ -25,12 +25,12 @@ export class ChatViewProvider implements WebviewViewProvider { this.client = createClient(webviewView, { navigate: async (context: Context) => { if (context?.filepath && context?.git_url) { - const url = `${context.git_url}/${context.filepath}#L${context.range.start}-L${context.range.end}`; + const url = `${context.git_url}/blob/main/${context.filepath}#L${context.range.start}-L${context.range.end}`; await env.openExternal(Uri.parse(url)); } }, }); - + webviewView.webview.onDidReceiveMessage((message) => { if (message.action === "rendered") { this.pendingMessages.forEach((message) => this.client?.sendMessage(message));