From 8b45aea8a8b9b4f3856c4847855a54c3dccf580d Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sat, 10 May 2025 16:28:54 -0700 Subject: [PATCH] fix link + add gemini tool id if empty --- .../browser/react/src/markdown/ChatMarkdownRender.tsx | 8 +++++--- .../void/electron-main/llmMessage/sendLLMMessage.impl.ts | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx b/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx index a1273331..bb042784 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/markdown/ChatMarkdownRender.tsx @@ -146,10 +146,12 @@ const CodespanWithLink = ({ text, rawText, chatMessageLocation }: { text: string } const onClick = () => { - if (!link || !link.selection) return; - + if (!link) return; // Use the updated voidOpenFileFn to open the file and handle selection - voidOpenFileFn(link.uri, accessor, [link.selection.startLineNumber, link.selection.endLineNumber]); + if (link.selection) + voidOpenFileFn(link.uri, accessor, [link.selection.startLineNumber, link.selection.endLineNumber]); + else + voidOpenFileFn(link.uri, accessor); } return