History

fix(web): show the full path in file link tooltips (#7741)

s243a committed 2 months ago

Commit 6d3bf011 parent e7235011 file · +3 −1Browse files

Unified · Split

apps/web/src/components/ChatMarkdown.tsx+3−1
@@ -1323,8 +1323,10 @@ const MarkdownFileLink = memo(function MarkdownFileLink({ · 1322 unmodified lines
1323 side="top"1323 side="top"
1324 className="max-w-[min(40rem,calc(100vw-2rem))] font-mono text-[11px] leading-tight"1324 className="max-w-[min(40rem,calc(100vw-2rem))] font-mono text-[11px] leading-tight"
1325 >1325 >
1326 {/* The full path: the chip already shows the shortened form, and a link
1327 to the workspace root collapses to a bare label that repeats it. */}
1326 <div className="overflow-x-auto whitespace-nowrap [scrollbar-color:color-mix(in_srgb,var(--border)_78%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[color-mix(in_srgb,var(--border)_78%,transparent)] [&::-webkit-scrollbar-track]:bg-transparent">1328 <div className="overflow-x-auto whitespace-nowrap [scrollbar-color:color-mix(in_srgb,var(--border)_78%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[color-mix(in_srgb,var(--border)_78%,transparent)] [&::-webkit-scrollbar-track]:bg-transparent">
1327 {displayPath}1329 {targetPath}
1328 </div>1330 </div>
1329 </TooltipPopup>1331 </TooltipPopup>
1330 </Tooltip>1332 </Tooltip>