Skip to content

Commit

Permalink
fix(frontend): tools display name
Browse files Browse the repository at this point in the history
  • Loading branch information
knajjars committed Jun 27, 2024
1 parent d392945 commit 6113e65
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const AgentForm: React.FC<Props> = ({
return (
<Checkbox
key={tool.name}
label={tool.name}
label={tool.display_name ?? tool.name}
name={tool.name + i}
checked={checked}
onChange={(e) => onToolToggle(tool.name, e.target.checked)}
Expand Down
24 changes: 11 additions & 13 deletions src/interfaces/coral_web/src/components/Settings/ToolsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,17 @@ export const ToolsTab: React.FC<{ requiredTools: string[] | undefined; className
const disabled = !!requiredTools;

return (
<>
<ToggleCard
key={name}
disabled={disabled}
errorMessage={error_message}
checked={checked}
label={display_name ?? name}
name={name}
icon={TOOL_ID_TO_DISPLAY_INFO[name]?.icon ?? TOOL_FALLBACK_ICON}
description={description ?? ''}
onToggle={(checked) => handleToggle(name, checked)}
/>
</>
<ToggleCard
key={name}
disabled={disabled}
errorMessage={error_message}
checked={checked}
label={display_name ?? name}
name={name}
icon={TOOL_ID_TO_DISPLAY_INFO[name]?.icon ?? TOOL_FALLBACK_ICON}
description={description ?? ''}
onToggle={(checked) => handleToggle(name, checked)}
/>
);
})}
</div>
Expand Down

0 comments on commit 6113e65

Please sign in to comment.