Skip to content
Merged
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
28 changes: 14 additions & 14 deletions webview-ui/src/components/chat/ChatRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ export const ChatRowContent = ({
)
) : cost !== null && cost !== undefined ? (
isExpanded ? (
<ChevronDown className="w-4" />
<ChevronDown className="w-4 shrink-0" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 — Repeated "w-4 shrink-0" across many icons. Consider extracting a small Icon utility (or a shared class/constant) to keep styling consistent and reduce duplication.

) : (
<ChevronRight className="w-4" />
<ChevronRight className="w-4 shrink-0" />
)
) : apiRequestFailedMessage ? (
getIconSpan("error", errorColor)
Expand All @@ -319,7 +319,7 @@ export const ChatRowContent = ({
]
case "followup":
return [
<MessageCircleQuestionMark className="w-4" aria-label="Question icon" />,
<MessageCircleQuestionMark className="w-4 shrink-0" aria-label="Question icon" />,
<span style={{ color: normalColor, fontWeight: "bold" }}>{t("chat:questions.hasQuestion")}</span>,
]
default:
Expand Down Expand Up @@ -372,7 +372,7 @@ export const ChatRowContent = ({
return (
<>
<div style={headerStyle}>
<FileDiff className="w-4" aria-label="Batch diff icon" />
<FileDiff className="w-4 shrink-0" aria-label="Batch diff icon" />
<span style={{ fontWeight: "bold" }}>
{t("chat:fileOperations.wantsToApplyBatchChanges")}
</span>
Expand Down Expand Up @@ -561,7 +561,7 @@ export const ChatRowContent = ({
return (
<>
<div style={headerStyle}>
<Eye className="w-4" aria-label="View files icon" />
<Eye className="w-4 shrink-0" aria-label="View files icon" />
<span style={{ fontWeight: "bold" }}>
{t("chat:fileOperations.wantsToReadMultiple")}
</span>
Expand All @@ -581,7 +581,7 @@ export const ChatRowContent = ({
return (
<>
<div style={headerStyle}>
<FileCode2 className="w-4" aria-label="Read file icon" />
<FileCode2 className="w-4 shrink-0" aria-label="Read file icon" />
<span style={{ fontWeight: "bold" }}>
{message.type === "ask"
? tool.isOutsideWorkspace
Expand All @@ -606,7 +606,7 @@ export const ChatRowContent = ({
</span>
<div style={{ flexGrow: 1 }}></div>
<SquareArrowOutUpRight
className="w-4 codicon codicon-link-external opacity-0 group-hover:opacity-100 transition-opacity"
className="w-4 shrink-0 codicon codicon-link-external opacity-0 group-hover:opacity-100 transition-opacity"
style={{ fontSize: 13.5, margin: "1px 0" }}
/>
</ToolUseBlockHeader>
Expand Down Expand Up @@ -636,7 +636,7 @@ export const ChatRowContent = ({
return (
<>
<div style={headerStyle}>
<ListTree className="w-4" aria-label="List files icon" />
<ListTree className="w-4 shrink-0" aria-label="List files icon" />
<span style={{ fontWeight: "bold" }}>
{message.type === "ask"
? tool.isOutsideWorkspace
Expand All @@ -662,7 +662,7 @@ export const ChatRowContent = ({
return (
<>
<div style={headerStyle}>
<FolderTree className="w-4" aria-label="Folder tree icon" />
<FolderTree className="w-4 shrink-0" aria-label="Folder tree icon" />
<span style={{ fontWeight: "bold" }}>
{message.type === "ask"
? tool.isOutsideWorkspace
Expand Down Expand Up @@ -754,7 +754,7 @@ export const ChatRowContent = ({
return (
<>
<div style={headerStyle}>
<PocketKnife className="w-4" aria-label="Switch mode icon" />
<PocketKnife className="w-4 shrink-0" aria-label="Switch mode icon" />
<span style={{ fontWeight: "bold" }}>
{message.type === "ask" ? (
<>
Expand Down Expand Up @@ -1120,7 +1120,7 @@ export const ChatRowContent = ({
return (
<div>
<div style={headerStyle}>
<MessageCircle className="w-4" aria-label="Speech bubble icon" />
<MessageCircle className="w-4 shrink-0" aria-label="Speech bubble icon" />
<span style={{ fontWeight: "bold" }}>{t("chat:text.rooSaid")}</span>
</div>
<div className="pl-6">
Expand All @@ -1139,7 +1139,7 @@ export const ChatRowContent = ({
return (
<div className="group">
<div style={headerStyle}>
<User className="w-4" aria-label="User icon" />
<User className="w-4 shrink-0" aria-label="User icon" />
<span style={{ fontWeight: "bold" }}>{t("chat:feedback.youSaid")}</span>
</div>
<div
Expand Down Expand Up @@ -1190,7 +1190,7 @@ export const ChatRowContent = ({
e.stopPropagation()
handleEditClick()
}}>
<Edit className="w-4" aria-label="Edit message icon" />
<Edit className="w-4 shrink-0" aria-label="Edit message icon" />
</div>
<div
className="cursor-pointer shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"
Expand All @@ -1199,7 +1199,7 @@ export const ChatRowContent = ({
e.stopPropagation()
vscode.postMessage({ type: "deleteMessage", value: message.ts })
}}>
<Trash2 className="w-4" aria-label="Delete message icon" />
<Trash2 className="w-4 shrink-0" aria-label="Delete message icon" />
</div>
</div>
</div>
Expand Down
Loading