SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Add ProviderIcon component to ChatHeader for improved provider icon handling
Salman-Ahamed92cfe9c0b6ab
diff --git a/packages/app/src/react/features/ai-chat/components/header.tsx b/packages/app/src/react/features/ai-chat/components/header.tsxindex fe111f3c..afa4ba37 100644--- a/packages/app/src/react/features/ai-chat/components/header.tsx+++ b/packages/app/src/react/features/ai-chat/components/header.tsx@@ -15,6 +15,43 @@ import { EVENTS } from '@src/shared/posthog/constants/events';import { LLMRegistry } from '@src/shared/services/LLMRegistry.service';import { llmModelsStore } from '@src/shared/state_stores/llm-models';+// #region Provider Icon Component+interface ProviderIconProps {+ provider: string;+ className?: string;+}++/**+ * Provider icon with gradient fallback+ * Shows provider SVG icon, falls back to gradient "AI" badge if image fails to load+ */+const ProviderIcon: FC<ProviderIconProps> = ({ provider, className = 'size-5 rounded-full' }) => {+ const [hasError, setHasError] = useState<boolean>(false);++ if (hasError) {+ return (+ <div+ className={cn(+ className,+ 'bg-gradient-to-br from-blue-400 to-purple-500 flex items-center justify-center',+ )}+ >+ <span className="text-white text-xs font-semibold">AI</span>+ </div>+ );+ }++ return (+ <img+ className={className}+ alt={`${provider} icon`}+ onError={() => setHasError(true)}+ src={`/img/provider_${provider.toLowerCase()}.svg`}+ />+ );+};+// #endregion Provider Icon Component+// #region Temporary Badgesconst TEMP_BADGES: Record<string, boolean> = {enterprise: true,@@ -253,11 +290,7 @@ export const ChatHeader: FC = () => {onClick={() => setProvider(llmProvider)}><div className="w-full flex items-center gap-2">- <img- src={`/img/provider_${llmProvider.toLowerCase()}.svg`}- alt={`${llmProvider} icon`}- className="size-5"- />+ <ProviderIcon provider={llmProvider} /><span className="font-semibold text-sm text-slate-900">{llmProvider}</span>@@ -271,6 +304,7 @@ export const ChatHeader: FC = () => {</div>))}</div>+<divclassName={cn('absolute left-[240px] z-50 w-[300px] max-h-[500px] overflow-y-auto bg-slate-100 rounded-md shadow-xl',diff --git a/packages/app/static/img/provider_ollama.svg b/packages/app/static/img/provider_ollama.svgnew file mode 100644index 00000000..2e087a00--- /dev/null+++ b/packages/app/static/img/provider_ollama.svg@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="188" height="188">+<path d="M0 0 C62.04 0 124.08 0 188 0 C188 62.04 188 124.08 188 188 C125.96 188 63.92 188 0 188 C0 125.96 0 63.92 0 0 Z " fill="#FCFCFC" transform="translate(0,0)"/>+<path d="M0 0 C4.43547439 0.80338121 6.83948357 2.97271317 9.56640625 6.46484375 C13.62153062 12.7416586 15.51832754 19.11264984 16.56640625 26.46484375 C20.269874 26.00191028 23.59670713 25.45596246 27.19140625 24.40234375 C33.94288952 22.66172697 41.61950861 22.20188762 48.06640625 24.96484375 C49.30390625 25.70734375 49.30390625 25.70734375 50.56640625 26.46484375 C53.17072034 26.59008815 53.17072034 26.59008815 55.56640625 26.46484375 C55.78554687 25.48644531 56.0046875 24.50804688 56.23046875 23.5 C58.35865061 14.52337933 60.8738363 7.1574137 67.56640625 0.46484375 C72.25787589 -0.26081522 76.44532559 0.04179444 80.87890625 1.71484375 C87.49982971 8.48974217 90.495439 19.69634246 90.59375 29.07275391 C90.51807701 30.81682061 90.43168617 32.56045446 90.3347168 34.3034668 C89.65390881 44.43858476 89.65390881 44.43858476 94.25390625 53.15234375 C94.9809375 53.87164062 95.70796875 54.5909375 96.45703125 55.33203125 C103.58660349 62.54082096 104.80199932 71.76275702 104.89868164 81.4453125 C104.81929382 87.25678226 103.28310583 92.19079675 101.40234375 97.6796875 C100.01531288 102.30096326 101.06050768 105.64413588 102.31640625 110.1640625 C105.42030886 121.8186199 106.2646987 134.48038977 100.453125 145.59375 C98.0668114 150.62918707 100.79232633 157.51084005 102.12890625 162.58984375 C104.37839904 171.48607907 104.37839904 171.48607907 103.56640625 175.46484375 C101.50483292 177.67286765 99.32990913 179.24598171 96.56640625 180.46484375 C95.24640625 180.46484375 93.92640625 180.46484375 92.56640625 180.46484375 C92.540625 179.61664063 92.51484375 178.7684375 92.48828125 177.89453125 C92.10541454 169.97615147 90.91279579 163.27406775 88.40625 155.71875 C86.85934597 149.72539624 87.17181232 145.57970737 90.06640625 140.15234375 C93.92827766 131.35831085 94.38969504 121.04447331 91.3984375 111.890625 C90.50204365 109.889432 89.58196136 107.89859243 88.6328125 105.921875 C87.04781111 102.26998535 87.35465394 100.23473982 88.56640625 96.46484375 C89.41889845 94.56825687 90.27326173 92.67251055 91.12890625 90.77734375 C94.09503664 83.88798857 94.99178499 77.44528477 92.90234375 70.14453125 C89.78855884 63.02344054 83.77772268 58.66844055 76.9375 55.375 C74.01264602 54.2522801 71.03871849 53.55255925 68.00390625 52.77734375 C61.96219572 51.02329876 59.59691829 48.80098564 56.17578125 43.65234375 C52.53181897 38.69938531 46.47174872 35.79053288 40.56640625 34.46484375 C32.49295917 33.44980688 25.53398387 35.4722968 19.0390625 40.37109375 C14.70372182 44.09449542 14.70372182 44.09449542 11.25390625 48.59765625 C8.73762923 51.38187018 6.12804115 51.56561351 2.50390625 52.33984375 C-5.004022 54.1458342 -12.32848793 56.25746139 -17.1171875 62.74609375 C-21.23259837 69.9276606 -22.30862942 76.22257225 -21.43359375 84.46484375 C-19.87642521 89.65915325 -17.85832516 94.61538093 -15.43359375 99.46484375 C-14.84659021 104.39567346 -16.15633228 107.24900404 -18.41015625 111.4609375 C-22.20990164 118.90089699 -22.27644112 126.51573392 -20.14453125 134.39453125 C-19.10463277 137.42280704 -17.70961314 140.25311289 -16.23828125 143.09375 C-14.30329531 148.79538332 -15.66459709 153.9463102 -17.37109375 159.52734375 C-19.50187968 166.85076236 -20.19816748 173.82526118 -20.43359375 181.46484375 C-28.55961834 178.86136014 -28.55961834 178.86136014 -31.43359375 175.46484375 C-31.75370978 171.55142525 -30.7248833 167.81205792 -29.90234375 164.0078125 C-28.01507042 155.19591129 -27.69638889 148.41177835 -30.43359375 139.71484375 C-33.62775076 129.23437128 -33.29566888 119.71502347 -30.08984375 109.28125 C-28.70740982 103.34830439 -29.48469238 98.64913943 -31.43359375 92.96484375 C-34.62908106 82.02377307 -35.28700401 72.6327125 -29.80859375 62.46484375 C-26.86335089 57.31248109 -23.52690234 52.75782593 -19.43359375 48.46484375 C-18.24678155 46.09121935 -18.3597526 44.77249641 -18.44140625 42.1328125 C-18.7602902 27.5206621 -18.60624836 13.72763129 -9.07421875 1.7578125 C-6.25200705 -0.4663591 -3.4699759 -0.12627278 0 0 Z " fill="#090909" transform="translate(58.43359375,3.53515625)"/>+<path d="M0 0 C0 0.66 0 1.32 0 2 C0.70125 2.165 1.4025 2.33 2.125 2.5 C6.61832608 4.84434404 10.08745534 9.15242089 11.6484375 14.0234375 C12.60966 19.42764402 12.72145521 23.36032911 9.9375 28.125 C3.9085963 36.64228778 -2.81811314 39.80487945 -13 42 C-20.73616264 43.08087673 -28.32386989 41.56911366 -34.75 37.078125 C-41.4065222 31.46652198 -44.34921574 27.2062741 -45.4375 18.5 C-44.526507 11.21205597 -41.0614315 6.08157606 -35.39453125 1.4765625 C-24.64227311 -5.15370435 -11.37458384 -4.14518457 0 0 Z " fill="#F2F2F2" transform="translate(111,84)"/>+<path d="M0 0 C0 0.66 0 1.32 0 2 C0.70125 2.165 1.4025 2.33 2.125 2.5 C6.61832608 4.84434404 10.08745534 9.15242089 11.6484375 14.0234375 C12.60966 19.42764402 12.72145521 23.36032911 9.9375 28.125 C3.9085963 36.64228778 -2.81811314 39.80487945 -13 42 C-20.73616264 43.08087673 -28.32386989 41.56911366 -34.75 37.078125 C-41.4065222 31.46652198 -44.34921574 27.2062741 -45.4375 18.5 C-44.526507 11.21205597 -41.0614315 6.08157606 -35.39453125 1.4765625 C-24.64227311 -5.15370435 -11.37458384 -4.14518457 0 0 Z M-35.0625 11.125 C-37.77516698 15.15024778 -38.62314149 17.10388826 -38 22 C-35.71549266 27.03114785 -32.85638851 31.01282756 -27.875 33.5625 C-19.41673797 36.6719454 -11.03165486 35.70691763 -3 32 C-3 31.34 -3 30.68 -3 30 C-2.4225 29.79375 -1.845 29.5875 -1.25 29.375 C1.9301561 27.43157127 3.24341266 25.26223364 5 22 C5.64878894 18.10726638 5.23018882 16.43381739 3.375 12.9375 C0.1326738 8.92725444 -3.00079079 5.66640307 -8 4 C-17.77413927 3.22467816 -28.18089085 3.14858939 -35.0625 11.125 Z " fill="#0F0F0F" transform="translate(111,84)"/>+<path d="M0 0 C2.3125 -0.3125 2.3125 -0.3125 5 0 C8.35656269 4.3155806 9.13193569 8.41803277 9.09765625 13.765625 C9.09443359 14.65507812 9.09121094 15.54453125 9.08789062 16.4609375 C9.07951172 17.38132812 9.07113281 18.30171875 9.0625 19.25 C9.05798828 20.18585937 9.05347656 21.12171875 9.04882812 22.0859375 C9.03706918 24.39069041 9.02063426 26.69531227 9 29 C6.85423363 29.02685938 4.70837355 29.04633088 2.5625 29.0625 C1.36753906 29.07410156 0.17257813 29.08570312 -1.05859375 29.09765625 C-4 29 -4 29 -5 28 C-5.8404846 18.67648478 -4.94815401 8.0969793 0 0 Z " fill="#F3F3F3" transform="translate(129,16)"/>+<path d="M0 0 C1.4540625 0.0309375 1.4540625 0.0309375 2.9375 0.0625 C7.70027877 8.07262794 8.75068893 17.87157398 7.9375 27.0625 C6.9375 28.0625 6.9375 28.0625 4.03125 28.1953125 C2.8453125 28.19273438 1.659375 28.19015625 0.4375 28.1875 C-0.7484375 28.19007812 -1.934375 28.19265625 -3.15625 28.1953125 C-6.0625 28.0625 -6.0625 28.0625 -7.0625 27.0625 C-7.87400718 18.1515269 -6.42517039 9.64401264 -4.0625 1.0625 C-3.0625 0.0625 -3.0625 0.0625 0 0 Z " fill="#EFEFEF" transform="translate(57.0625,16.9375)"/>+<path d="M0 0 C3.08520678 -0.3980912 5.04378088 -0.61806554 8 0 C10.5625 2.125 10.5625 2.125 12 5 C11.93572343 8.21382832 11.53112958 10.16137435 9.8125 12.875 C7.02330727 14.60622307 5.20853478 14.52384241 2 14 C-0.94622161 11.36390698 -1.90256913 9.81192395 -2.375 5.875 C-2 3 -2 3 0 0 Z " fill="#111111" transform="translate(125,82)"/>+<path d="M0 0 C3.84974401 0.61595904 5.49514664 1.63810076 8.125 4.5 C8.76747553 8.26307099 8.2860211 9.25846834 6.125 12.5 C3.14639805 13.46028287 0.24338805 13.68245888 -2.875 13.5 C-5.5 11.875 -5.5 11.875 -6.875 9.5 C-6.80155295 6.56211783 -6.02261195 4.78745486 -4.6875 2.1875 C-2.875 0.5 -2.875 0.5 0 0 Z " fill="#141414" transform="translate(58.875,82.5)"/>+<path d="M0 0 C1.8125 1.1875 1.8125 1.1875 3 3 C3.3125 5.5625 3.3125 5.5625 3 8 C1 10 1 10 -1.9375 10.375 C-5 10 -5 10 -6.9375 8.3125 C-8.27524691 5.4009332 -8.05066859 3.99036444 -7 1 C-4.45132831 -0.27433584 -2.82594567 -0.27570202 0 0 Z " fill="#0F0F0F" transform="translate(97,97)"/>+</svg>