diff --git a/clients/vscode/src/chat/ChatViewProvider.ts b/clients/vscode/src/chat/ChatViewProvider.ts index a2d9b0169c52..13ac9cdea710 100644 --- a/clients/vscode/src/chat/ChatViewProvider.ts +++ b/clients/vscode/src/chat/ChatViewProvider.ts @@ -38,8 +38,16 @@ export class ChatViewProvider implements WebviewViewProvider { this.client = createClient(webviewView, { navigate: async (context: Context) => { if (context?.filepath && context?.git_url) { - const url = `${context.git_url}/blob/main/${context.filepath}#L${context.range.start}-L${context.range.end}`; - await env.openExternal(Uri.parse(url)); + const serverInfo = await this.agent.fetchServerInfo(); + + const url = new URL(`${serverInfo.config.endpoint}/files`); + const searchParams = new URLSearchParams(); + searchParams.append("redirect_filepath", context.filepath); + searchParams.append("redirect_git_url", context.git_url); + searchParams.append("line", String(context.range.start)); + url.search = searchParams.toString(); + + await env.openExternal(Uri.parse(url.toString())); } }, }); diff --git a/ee/tabby-ui/app/chat/page.tsx b/ee/tabby-ui/app/chat/page.tsx index dca6cad06115..70eda8475654 100644 --- a/ee/tabby-ui/app/chat/page.tsx +++ b/ee/tabby-ui/app/chat/page.tsx @@ -159,7 +159,6 @@ export default function ChatPage() { onLoaded={onChatLoaded} maxWidth={maxWidth} onCopyContent={from === 'vscode' ? onCopyContent : undefined} - isReferenceClickable={from !== 'vscode'} /> ) }