Skip to content

Commit

Permalink
navigate url
Browse files Browse the repository at this point in the history
  • Loading branch information
wwayne committed May 24, 2024
1 parent 2ab7208 commit 406e141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/vscode/src/ChatViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 406e141

Please sign in to comment.