Skip to content

Commit 666db29

Browse files
authored
Fix tool icons (#2510)
* feat: add model id on token usage * fix: tool icons
1 parent 418e2d9 commit 666db29

27 files changed

Lines changed: 78 additions & 23 deletions

frontend/public/toolIcons/tool_cryptoprice.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/public/toolIcons/tool_notes.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/public/toolIcons/tool_read_webpage.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/public/toolIcons/tool_scheduler.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/public/toolIcons/tool_todo_list.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/src/agents/NewAgent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
type MultiSelectPopoverItem,
3434
} from '../components/MultiSelectPopover';
3535
import Spinner from '../components/Spinner';
36+
import ToolIcon from '../components/ToolIcon';
3637
import AgentDetailsModal from '../modals/AgentDetailsModal';
3738
import ConfirmationModal from '../modals/ConfirmationModal';
3839
import { ActiveState, Doc, Prompt } from '../models/misc';
@@ -487,7 +488,7 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) {
487488
const base: MultiSelectPopoverItem = {
488489
id: tool.id,
489490
label: getToolDisplayName(tool),
490-
icon: `/toolIcons/tool_${tool.name}.svg`,
491+
icon: <ToolIcon name={tool.name} className="h-5 w-5" />,
491492
group: groupFor(tool),
492493
};
493494
if (tool.name === 'remote_device') {

frontend/src/agents/SharedAgentCard.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useTranslation } from 'react-i18next';
22

33
import EditIcon from '../assets/edit.svg';
4+
import ToolIcon from '../components/ToolIcon';
45
import { Avatar } from '../components/ui/avatar';
56
import { Button } from '../components/ui/button';
67
import { getToolDisplayName } from '../utils/toolUtils';
@@ -87,9 +88,9 @@ export default function SharedAgentCard({
8788
key={index}
8889
className="bg-accent text-foreground dark:bg-card flex items-center gap-1 rounded-full px-3 py-1 text-xs font-light"
8990
>
90-
<img
91-
src={`/toolIcons/tool_${tool.name}.svg`}
92-
alt={`${getToolDisplayName(tool)} icon`}
91+
<ToolIcon
92+
name={tool.name}
93+
title={`${getToolDisplayName(tool)} icon`}
9394
className="h-3 w-3"
9495
/>{' '}
9596
{getToolDisplayName(tool)}
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)