Elffuss BraidHub

kikocis/continue public

main · 774 BRawPermalink
1import { SparklesIcon } from "@heroicons/react/24/outline";
2import { ProfileDescription } from "core/config/ProfileLifecycleManager";
3import { isLocalProfile } from "../../util";
4import { BotIcon } from "../svg/BotIcon";
5
6export interface AssistantIconProps {
7 assistant: ProfileDescription;
8 size?: string;
9}
10
11export function AssistantIcon({
12 assistant,
13 size = "h-4 w-4",
14}: AssistantIconProps) {
15 if (isLocalProfile(assistant)) {
16 return <BotIcon className={`text-foreground ${size} flex-shrink-0`} />;
17 } else if (assistant.iconUrl) {
18 return (
19 <img
20 src={assistant.iconUrl}
21 className={`${size} flex-shrink-0 rounded-full`}
22 alt=""
23 />
24 );
25 } else {
26 return <SparklesIcon className={`${size} flex-shrink-0`} />;
27 }
28}