From 61fc59390393361d3d4e101fedfdab48fd7b2650 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sat, 10 May 2025 15:53:05 -0700 Subject: [PATCH] shorten non URL links too --- .../void/browser/react/src/markdown/ChatMarkdownRender.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 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 be7d1de1..a1273331 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 @@ -137,11 +137,10 @@ const CodespanWithLink = ({ text, rawText, chatMessageLocation }: { text: string } - // If it's a file path, shorten it and add tooltip + // If it's a file path, shorten it and add tooltip (whether or not it's a link) let displayText = link?.displayText || text let tooltip: string | undefined = undefined - - if (link?.uri && isValidUri(displayText)) { + if (isValidUri(displayText)) { tooltip = getRelative(URI.file(displayText), accessor) // Full path as tooltip displayText = getBasename(displayText) }