Skip to content

Commit d89431b

Browse files
committed
Revert "feat(webview-ui): support codicon- and lucide- icons via InlineIcon; map Debug to lucide-bug"
This reverts commit a331d1d.
1 parent a68c612 commit d89431b

File tree

3 files changed

+7
-103
lines changed

3 files changed

+7
-103
lines changed

webview-ui/src/components/chat/ModeSelector.tsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { useRooPortal } from "@/components/ui/hooks/useRooPortal"
1515
import { Popover, PopoverContent, PopoverTrigger, StandardTooltip } from "@/components/ui"
1616

1717
import { IconButton } from "./IconButton"
18-
import InlineIcon from "../common/InlineIcon"
1918

2019
const SEARCH_THRESHOLD = 6
2120

@@ -212,13 +211,9 @@ export const ModeSelector = ({
212211
)}>
213212
<div className="flex items-center gap-1 truncate">
214213
{selectedMode?.icon && (
215-
<InlineIcon
216-
token={
217-
selectedMode.icon.startsWith("codicon-") || selectedMode.icon.startsWith("lucide-")
218-
? selectedMode.icon
219-
: `codicon-${selectedMode.icon}`
220-
}
221-
className="text-[11px] leading-none"
214+
<span
215+
className={`codicon codicon-${selectedMode.icon} text-[11px] leading-none`}
216+
aria-hidden="true"
222217
/>
223218
)}
224219
<span className="truncate">{selectedMode?.name || ""}</span>
@@ -284,14 +279,9 @@ export const ModeSelector = ({
284279
<div className="flex-1 min-w-0">
285280
<div className="font-bold truncate flex items-center gap-1">
286281
{mode.icon && (
287-
<InlineIcon
288-
token={
289-
mode.icon.startsWith("codicon-") ||
290-
mode.icon.startsWith("lucide-")
291-
? mode.icon
292-
: `codicon-${mode.icon}`
293-
}
294-
className="text-[11px] leading-none"
282+
<span
283+
className={`codicon codicon-${mode.icon} text-[11px] leading-none`}
284+
aria-hidden="true"
295285
/>
296286
)}
297287
<span className="truncate">{mode.name}</span>

webview-ui/src/components/common/IconButton.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { StandardTooltip } from "@/components/ui"
2-
import InlineIcon from "./InlineIcon"
32

43
interface IconButtonProps {
54
icon: string
@@ -27,18 +26,13 @@ export function IconButton({
2726
medium: "w-7 h-7",
2827
}
2928

30-
const iconSize = size === "small" ? 14 : 16
31-
3229
const variantClasses = {
3330
default: "bg-transparent hover:bg-vscode-toolbar-hoverBackground",
3431
transparent: "bg-transparent hover:bg-vscode-toolbar-hoverBackground",
3532
}
3633

3734
const handleClick = onClick || ((_event: React.MouseEvent) => {})
3835

39-
// Support both raw codicon names (e.g., "extensions") and fully-qualified tokens ("codicon-..." | "lucide-...")
40-
const token = icon.startsWith("codicon-") || icon.startsWith("lucide-") ? icon : `codicon-${icon}`
41-
4236
const button = (
4337
<button
4438
className={`${sizeClasses[size]} flex items-center justify-center border-none text-vscode-editor-foreground cursor-pointer rounded-[3px] ${variantClasses[variant]}`}
@@ -47,7 +41,7 @@ export function IconButton({
4741
onMouseDown={onMouseDown}
4842
onMouseUp={onMouseUp}
4943
onMouseLeave={onMouseLeave}>
50-
<InlineIcon token={token} size={iconSize} />
44+
<span className={`codicon codicon-${icon}`}></span>
5145
</button>
5246
)
5347

webview-ui/src/components/common/InlineIcon.tsx

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)