Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions webview-ui/src/components/history/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import { useAppTranslation } from "@/i18n/TranslationContext"

type CopyButtonProps = {
itemTask: string
className?: string
}

export const CopyButton = ({ itemTask }: CopyButtonProps) => {
export const CopyButton = ({ itemTask, className }: CopyButtonProps) => {
const { isCopied, copy } = useClipboard()
const { t } = useAppTranslation()

Expand All @@ -34,7 +35,7 @@ export const CopyButton = ({ itemTask }: CopyButtonProps) => {
title={t("history:copyPrompt")}
onClick={onCopy}
data-testid="copy-prompt-button"
className="opacity-50 hover:opacity-100">
className={cn("opacity-50 hover:opacity-100", className)}>
<span className={cn("codicon scale-80", { "codicon-check": isCopied, "codicon-copy": !isCopied })} />
</Button>
)
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/history/TaskItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const TaskItem = ({
"cursor-pointer",
{
// Compact variant styling
"bg-vscode-editor-background rounded relative overflow-hidden border border-vscode-toolbar-hoverBackground/30 hover:border-vscode-toolbar-hoverBackground/60":
"group bg-vscode-editor-background rounded relative overflow-hidden border border-vscode-toolbar-hoverBackground/30 hover:border-vscode-toolbar-hoverBackground/60":
isCompact,
// Full variant styling
"bg-vscode-list-activeSelectionBackground": !isCompact && isSelectionMode && isSelected,
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/history/TaskItemHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const TaskItemHeader: React.FC<TaskItemHeaderProps> = ({ item, variant, isSelect

{/* Action Buttons */}
{!isSelectionMode && (
<div className="flex flex-row gap-0 items-center opacity-50 hover:opacity-100">
<div className="flex flex-row gap-0 items-center opacity-20 group-hover:opacity-50 hover:opacity-100">
{isCompact ? (
<CopyButton itemTask={item.task} />
) : (
Expand Down
Loading