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: 5 additions & 0 deletions .changeset/happy-seals-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hai-build-code-generator": patch
---

Fix expert icon rendering to properly display image or fallback to a default icon.
9 changes: 7 additions & 2 deletions webview-ui/src/components/chat/ChatTextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,15 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
onClick={handleExpertsButtonClick}
tabIndex={0}>
<ExpertsButtonContent>
{selectedExpert && selectedExpert.iconComponent && (
{selectedExpert && selectedExpert.iconComponent ? (
<div style={{ width: "12px", height: "12px", display: "flex", alignItems: "center" }}>
<selectedExpert.iconComponent />
<img src={selectedExpert.iconComponent} alt={`${selectedExpert.name} icon`} />
</div>
) : (
<span
className="codicon codicon-person"
style={{ fontSize: "12px", width: "12px", height: "12px" }}
/>
)}
{selectedExpert ? selectedExpert.name : "Default"}
</ExpertsButtonContent>
Expand Down
Loading