From 38fb80fe19f9c73d6fbf3e4bb73255746232ea54 Mon Sep 17 00:00:00 2001 From: hannesrudolph Date: Mon, 14 Jul 2025 15:47:11 -0600 Subject: [PATCH] refactor: improve tooltip implementation to follow codebase standards - Replace native title attributes with StandardTooltip component - Add info icon with tooltip next to 'Manage Command Permissions' header - Remove redundant instruction text (now in tooltip) - Follow established pattern from settings components --- .../chat/CommandPatternSelector.tsx | 80 +++++++++++-------- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/webview-ui/src/components/chat/CommandPatternSelector.tsx b/webview-ui/src/components/chat/CommandPatternSelector.tsx index 5753758fd1..9cc9c86f7a 100644 --- a/webview-ui/src/components/chat/CommandPatternSelector.tsx +++ b/webview-ui/src/components/chat/CommandPatternSelector.tsx @@ -2,6 +2,7 @@ import { useState } from "react" import { ChevronDown, Check, X } from "lucide-react" import { useAppTranslation } from "@src/i18n/TranslationContext" import { cn } from "@src/lib/utils" +import { StandardTooltip } from "@src/components/ui/standard-tooltip" interface CommandPattern { pattern: string @@ -60,12 +61,17 @@ export const CommandPatternSelector = ({ })} /> {t("chat:commandExecution.manageCommands")} + {isExpanded && ( + + + + )} {isExpanded && (
-
- {t("chat:commandExecution.commandManagementDescription")} -
{patterns.map((item, index) => { const status = getPatternStatus(item.pattern) return ( @@ -79,38 +85,42 @@ export const CommandPatternSelector = ({ )}
- - + + + + + +
)