From 4bf749fd5f48072257bae3ff65897910d626fb4b Mon Sep 17 00:00:00 2001 From: alelpoan Date: Sat, 4 Jul 2026 01:42:08 +0300 Subject: [PATCH] fix(desktop): add tooltip and fix scrollbar overlap on tool output copy button --- .../components/assistant-ui/tool/fallback.tsx | 3 +- .../desktop/src/components/ui/copy-button.tsx | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/apps/desktop/src/components/assistant-ui/tool/fallback.tsx b/apps/desktop/src/components/assistant-ui/tool/fallback.tsx index 63e81c8c8..a501b7c9e 100644 --- a/apps/desktop/src/components/assistant-ui/tool/fallback.tsx +++ b/apps/desktop/src/components/assistant-ui/tool/fallback.tsx @@ -486,10 +486,11 @@ function ToolEntry({ part }: ToolEntryProps) { {copyAction.text && ( diff --git a/apps/desktop/src/components/ui/copy-button.tsx b/apps/desktop/src/components/ui/copy-button.tsx index f7eed235d..ff7663ff9 100644 --- a/apps/desktop/src/components/ui/copy-button.tsx +++ b/apps/desktop/src/components/ui/copy-button.tsx @@ -49,6 +49,7 @@ export interface CopyButtonProps { onCopyError?: (error: unknown) => void preventDefault?: boolean showLabel?: boolean + side?: React.ComponentProps['side'] stopPropagation?: boolean text: CopyPayload title?: string @@ -69,6 +70,7 @@ export function CopyButton({ onCopyError, preventDefault = false, showLabel, + side, stopPropagation = false, text, title @@ -180,18 +182,20 @@ export function CopyButton({ if (appearance === 'inline') { return ( - + + + ) } @@ -229,5 +233,5 @@ export function CopyButton({ ) // Only icon-only buttons need a tooltip; the text variant already shows its label. - return appearance === 'icon' ? {button} : button + return appearance === 'icon' ? {button} : button }