Skip to content

Build your personal knowledge base with Trilium Notes

feat(llm): draw the provider marks from the brand icon pack

Elian Dorane368299e5488
diff --git a/.claude/skills/building-client-ui/SKILL.md b/.claude/skills/building-client-ui/SKILL.md
index 0da5e448ee..2ca64e2432 100644
--- a/.claude/skills/building-client-ui/SKILL.md
+++ b/.claude/skills/building-client-ui/SKILL.md
@@ -100,7 +100,8 @@ Display and layout:
- `Card` — a titled group of sections (filter-aware under `FilterProvider`). **Anything that scrolls inside a card** (a list, a set of chips, a log, a table with a `max-height`) goes in a `CardSection noPadding`, with the card's padding moved onto the scrolling element itself: `padding: var(--card-padding-block) var(--card-padding-inline)`. In a padded section the scroller stops short of the card's border, so scrolled content is cut off along an inset edge with an empty strip of padding between the cut and the border. `NoteChips` (`.tn-card-section.tn-no-padding > .note-chips`) is the worked example. `Collapsible` — animated, theme-styled expandable section with self-managed `initiallyExpanded`; `ExternallyControlledCollapsible` is the controlled variant (caller owns `expanded`/`setExpanded`).
- `TabStrip` — a row of icon-only tabs named by tooltips, heading a panel divided into groups.
- `Modal`, `WizardModal` — dialogs; `Popover` — a card anchored beside something, with an arrow pointing at it, as the calendar's event card (portaled to the body and placed by `placeFloating()`, so no scroll container clips it).
-- `LoadingSpinner`, `LazyComponent`, `Icon`, `MaskedIcon`, `NoteList`, `SiblingNavigator`, `ImageViewer`, `CodeBlock`, `charts/DonutChart`, `charts/Treemap`.
+- `LoadingSpinner`, `LazyComponent`, `Icon`, `NoteList`, `SiblingNavigator`, `ImageViewer`, `CodeBlock`, `charts/DonutChart`, `charts/Treemap`.
+- A third-party mark (an AI provider, an import source) is an `Icon` from the built-in `tn-brand` pack (`"tn-brand tn-brand-notion"`), not an imported SVG. A new mark is an SVG in `apps/icon-pack-builder/brand-icons/`, built with `pnpm --filter @triliumnext/icon-pack-builder start tn-brand`.
Data grids and calendars (outside `widgets/react/`, but equally generic):
diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsx
index 1bcfd4170c..c1dd0d57a7 100644
--- a/apps/client/src/widgets/react/FormList.tsx
+++ b/apps/client/src/widgets/react/FormList.tsx
@@ -405,8 +405,6 @@ export interface FormDropdownSubmenuProps {
icon?: string;
/** The SVG of an icon drawn in place of {@link icon}, such as a CKEditor toolbar item's. */
iconSvg?: string;
- /** An element drawn in place of {@link icon}, such as a `MaskedIcon`, with the `tn-icon` class. */
- iconElement?: ComponentChildren;
title: ComponentChildren;
children: ComponentChildren;
/** A line under the title, as {@link FormListItem} shows one. */
@@ -436,7 +434,7 @@ export function FormDropdownSubmenu(props: FormDropdownSubmenuProps) {
return <MenuSubmenu {...props} menu={menu} />;
}
-function MenuSubmenu({ menu, icon, iconSvg, iconElement, title, description, children, onDropdownToggleClicked, split = !!onDropdownToggleClicked, disabled, className, filterable }: FormDropdownSubmenuProps & { menu: MenuContextValue }) {
+function MenuSubmenu({ menu, icon, iconSvg, title, description, children, onDropdownToggleClicked, split = !!onDropdownToggleClicked, disabled, className, filterable }: FormDropdownSubmenuProps & { menu: MenuContextValue }) {
const level = useContext(MenuLevelContext);
const id = useUniqueName("menu-row");
const openSubmenu = menu.open[level];
@@ -493,7 +491,7 @@ function MenuSubmenu({ menu, icon, iconSvg, iconElement, title, description, chi
}}
>
<span className="dropdown-toggle">
- {iconSvg ? <SvgIcon svg={iconSvg} /> : iconElement ?? <Icon icon={icon} />}
+ {iconSvg ? <SvgIcon svg={iconSvg} /> : <Icon icon={icon} />}
<span className="tn-menu-gap" />
{description ? (
<div>
diff --git a/apps/client/src/widgets/react/MaskedIcon.css b/apps/client/src/widgets/react/MaskedIcon.css
deleted file mode 100644
index 4ca1d8f410..0000000000
--- a/apps/client/src/widgets/react/MaskedIcon.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.masked-icon {
- display: inline-block;
- flex-shrink: 0;
- width: var(--masked-icon-size, 1.5em);
- height: var(--masked-icon-size, 1.5em);
- background-color: currentColor;
- -webkit-mask: var(--masked-icon-url) center / contain no-repeat;
- mask: var(--masked-icon-url) center / contain no-repeat;
-}
diff --git a/apps/client/src/widgets/react/MaskedIcon.tsx b/apps/client/src/widgets/react/MaskedIcon.tsx
deleted file mode 100644
index e228ec0e04..0000000000
--- a/apps/client/src/widgets/react/MaskedIcon.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import "./MaskedIcon.css";
-
-interface MaskedIconProps {
- /** URL of an SVG (e.g. an imported `*.svg?url`) rendered monochrome via a CSS mask. */
- url: string;
- className?: string;
-}
-
-/** A monochrome icon rendered from an SVG URL via a CSS mask, tinted with `currentColor`. */
-export default function MaskedIcon({ url, className }: MaskedIconProps) {
- return <span className={`masked-icon ${className ?? ""}`} style={{ "--masked-icon-url": `url("${url}")` }} />;
-}
diff --git a/apps/client/src/widgets/react/Menu.spec.tsx b/apps/client/src/widgets/react/Menu.spec.tsx
index 37a2130001..3ba093d4c9 100644
--- a/apps/client/src/widgets/react/Menu.spec.tsx
+++ b/apps/client/src/widgets/react/Menu.spec.tsx
@@ -118,16 +118,16 @@ describe("Menu with declared rows", () => {
expect(calls).toEqual([]);
});
- it("draws a submenu row's own icon element and a description under its title", () => {
+ it("draws a submenu row's icon and a description under its title", () => {
render((
<Menu anchor={{ x: 10, y: 10 }} onClose={vi.fn()}>
- <FormDropdownSubmenu title="Search" description="Tavily" iconElement={<span className="tn-icon mark" />}>
+ <FormDropdownSubmenu title="Search" description="Tavily" icon="tn-brand tn-brand-tavily">
<FormListItem>Tavily</FormListItem>
</FormDropdownSubmenu>
</Menu>
), host);
const toggle = document.querySelector(".dropdown-submenu > .dropdown-toggle");
- expect(toggle?.firstElementChild?.className).toBe("tn-icon mark");
+ expect(toggle?.firstElementChild?.className).toBe("tn-brand tn-brand-tavily tn-icon");
expect(toggle?.querySelector(".description")?.textContent).toBe("Tavily");
expect(toggle?.querySelector(".description")?.previousElementSibling?.textContent).toBe("Search");
});
diff --git a/apps/client/src/widgets/react/SelectableCard.css b/apps/client/src/widgets/react/SelectableCard.css
index 9efdb8bcb5..172948ad89 100644
--- a/apps/client/src/widgets/react/SelectableCard.css
+++ b/apps/client/src/widgets/react/SelectableCard.css
@@ -36,8 +36,7 @@ body.mobile .selectable-card-grid {
}
.selectable-card:disabled .selectable-card-name,
-.selectable-card:disabled .masked-icon,
-.selectable-card:disabled .selectable-card-bxicon {
+.selectable-card:disabled .selectable-card-icon {
opacity: 0.5;
}
@@ -47,8 +46,7 @@ body.mobile .selectable-card-grid {
color: var(--active-item-text-color);
}
-/* Boxicons-based card icon (used when `icon` is supplied instead of `iconUrl`). */
-.selectable-card-bxicon {
+.selectable-card-icon {
flex-shrink: 0;
font-size: 1.5em;
line-height: 1;
diff --git a/apps/client/src/widgets/react/SelectableCard.tsx b/apps/client/src/widgets/react/SelectableCard.tsx
index f3954a59fc..957dbc6470 100644
--- a/apps/client/src/widgets/react/SelectableCard.tsx
+++ b/apps/client/src/widgets/react/SelectableCard.tsx
@@ -2,14 +2,12 @@ import "./SelectableCard.css";
import type { ComponentChildren } from "preact";
-import MaskedIcon from "./MaskedIcon";
+import Icon from "./Icon";
export interface SelectableCardProps {
title: ComponentChildren;
description?: ComponentChildren;
- /** URL of an SVG rendered monochrome via a CSS mask (e.g. an imported `*.svg?url`). Provide either this or {@link icon}. */
- iconUrl?: string;
- /** Boxicons class (e.g. `"bx bx-import"`) shown in place of {@link iconUrl}. */
+ /** The icon class, such as `"bx bx-import"` or a brand mark's `"tn-brand tn-brand-notion"`. */
icon?: string;
selected: boolean;
onSelect: () => void;
@@ -28,12 +26,10 @@ export interface SelectableCardProps {
* state. Used by the import and export dialogs to pick a provider/format. Lay several out together with
* {@link SelectableCardGrid}.
*/
-export default function SelectableCard({ title, description, iconUrl, icon, selected, onSelect, disabled, className }: SelectableCardProps) {
+export default function SelectableCard({ title, description, icon, selected, onSelect, disabled, className }: SelectableCardProps) {
return (
<button type="button" className={`selectable-card ${selected ? "selected" : ""} ${className ?? ""}`} onClick={onSelect} disabled={disabled}>
- {iconUrl
- ? <MaskedIcon url={iconUrl} />
- : icon ? <span className={`selectable-card-bxicon ${icon}`} /> : null}
+ {icon && <Icon icon={icon} className="selectable-card-icon" />}
<span className="selectable-card-text">
<span className="selectable-card-name">{title}</span>
{description && <span className="selectable-card-description">{description}</span>}
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css
index d9eb34bbbe..4012a84017 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.css
@@ -294,7 +294,7 @@
* reads as a marker rather than competing with the name it qualifies.
*/
.llm-chat-model-icon {
- --masked-icon-size: 1.05em;
+ font-size: 1.05em;
opacity: 0.8;
}
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
index 4d3be54066..65e7ff3017 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatInputBar.tsx
@@ -14,10 +14,10 @@ import CKEditor, { type CKEditorApi } from "../../react/CKEditor.js";
import Dropdown from "../../react/Dropdown.js";
import { FormListHeader, FormListItem } from "../../react/FormList.js";
import { useLegacyImperativeHandlers, useTriliumOption } from "../../react/hooks.js";
+import Icon from "../../react/Icon.js";
import LightboxLink from "../../react/LightboxLink.js";
-import MaskedIcon from "../../react/MaskedIcon.js";
import AddProviderModal, { type LlmProviderConfig, type ProviderStep } from "../options/llm/AddProviderModal.js";
-import { providerIconUrl } from "../options/llm/provider_icons.js";
+import { providerIcon } from "../options/llm/provider_icons.js";
import { createNoteMentionList } from "../text/mention_list_view.js";
import { computeContextUsage } from "./chat_context_usage.js";
import { insertNewBlock as insertNewBlockCommand, isSelectionInCodeBlock, outdentListItemAtStart } from "./chat_input_editing.js";
@@ -415,7 +415,7 @@ export default function ChatInputBar({
// of a word's, and the only provider signal the collapsed button has.
text={currentModel
? <>
- <MaskedIcon url={providerIconUrl(currentModel.provider)} className="llm-chat-model-icon" />
+ <Icon icon={providerIcon(currentModel.provider)} className="llm-chat-model-icon" />
<span className="llm-chat-model-select-name">{shortModelName(currentModel.name, currentModel.provider)}</span>
</>
: <span className="llm-chat-model-select-name llm-chat-model-placeholder">{t("llm_chat.no_model_selected")}</span>}
@@ -445,7 +445,7 @@ export default function ChatInputBar({
onClick={() => handleModelSelect(model)}
checked={isSelectedModel(model)}
>
- <MaskedIcon url={providerIconUrl(model.provider)} className="llm-chat-model-icon" />
+ <Icon icon={providerIcon(model.provider)} className="llm-chat-model-icon" />
{shortModelName(model.name, model.provider)}{model.costDescription && <> <small>({model.costDescription})</small></>}
</FormListItem>
)) : (
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.css b/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.css
index b4ec21adb4..75d7ee1ce6 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.css
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.css
@@ -13,14 +13,8 @@
}
.llm-chat-tools-choice-icon {
- --masked-icon-size: 1em;
-
font-size: 1em;
margin-inline-end: 0.4em;
opacity: 0.8;
}
}
-
-.tn-dropdown-portal.llm-chat-tools .dropdown-submenu .masked-icon.tn-icon {
- --masked-icon-size: 1em;
-}
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.spec.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.spec.tsx
index afec91fcde..dd83ec3fb2 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.spec.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.spec.tsx
@@ -38,11 +38,11 @@ vi.mock("../../react/Dropdown.js", () => ({
// Renders a submenu as its row followed by its rows, as the menu draws them once it is open.
vi.mock("../../react/FormList.js", async (importOriginal) => ({
...(await importOriginal<typeof import("../../react/FormList.js")>()),
- FormDropdownSubmenu: ({ title, description, iconElement, children }: {
- title: ComponentChildren; description?: string; iconElement?: ComponentChildren; children: ComponentChildren;
+ FormDropdownSubmenu: ({ title, description, icon, children }: {
+ title: ComponentChildren; description?: string; icon?: string; children: ComponentChildren;
}) => (
<>
- <div className="submenu-row">{iconElement}{title}<span className="description">{description}</span></div>
+ <div className="submenu-row"><span className={icon} />{title}<span className="description">{description}</span></div>
{children}
</>
)
@@ -187,11 +187,10 @@ describe("ChatToolsDropdown", () => {
expect(off.description).toBe("llm_chat.web_search_disabled");
const tavily = submenuRow({ choice: "s1", enableWebSearch: true, webSearchProviderId: "s1" });
- expect(tavily.icon?.classList.contains("masked-icon")).toBe(true);
+ expect(tavily.icon?.className).toBe("tn-brand tn-brand-tavily");
const tavilyRowIcon = [ ...(host?.querySelectorAll(".menu .dropdown-item") ?? []) ]
.find((row) => row.textContent === "Tavily")?.querySelector(".llm-chat-tools-choice-icon");
- expect(tavily.icon?.getAttribute("style")).toBe(tavilyRowIcon?.getAttribute("style"));
- expect(tavilyRowIcon).toBeDefined();
+ expect(tavilyRowIcon?.classList.contains("tn-brand-tavily")).toBe(true);
expect(tavily.description).toBe("Tavily");
});
@@ -201,8 +200,8 @@ describe("ChatToolsDropdown", () => {
const [ disabled, builtIn, tavily ] = icons(renderMenu({ modelProvider: "anthropic" }));
expect(disabled?.classList.contains("bx-block")).toBe(true);
- expect(builtIn?.classList.contains("masked-icon")).toBe(true);
- expect(tavily?.classList.contains("masked-icon")).toBe(true);
+ expect(builtIn?.classList.contains("tn-brand-anthropic")).toBe(true);
+ expect(tavily?.classList.contains("tn-brand-tavily")).toBe(true);
// No model picked yet: nobody's mark to show.
expect(icons(renderMenu())[1]?.classList.contains("bx-globe")).toBe(true);
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.tsx
index fa0ef543a2..71faf02d1c 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ChatToolsDropdown.tsx
@@ -11,8 +11,7 @@ import Dropdown from "../../react/Dropdown.js";
import { FormDropdownDivider, FormDropdownSubmenu, FormListItem, FormListToggleableItem } from "../../react/FormList.js";
import { useTriliumOption } from "../../react/hooks.js";
import Icon from "../../react/Icon.js";
-import MaskedIcon from "../../react/MaskedIcon.js";
-import { providerIconUrl } from "../options/llm/provider_icons.js";
+import { providerIcon } from "../options/llm/provider_icons.js";
import type { UseLlmChatReturn } from "./useLlmChat.js";
/**
@@ -61,7 +60,7 @@ export default function ChatToolsDropdown({ enableNoteTools, onNoteToolsChange,
/>
<FormDropdownSubmenu
- iconElement={<WebSearchSourceIcon source={chosen} className="tn-icon" />}
+ icon={chosen.icon}
title={t("llm_chat.web_search")}
description={chosen.label}
>
@@ -75,7 +74,7 @@ export default function ChatToolsDropdown({ enableNoteTools, onNoteToolsChange,
closeOnSelect={false}
onClick={() => onWebSearchChoose(source.choice)}
>
- <WebSearchSourceIcon source={source} className="llm-chat-tools-choice-icon" />
+ <Icon icon={source.icon} className="llm-chat-tools-choice-icon" />
{source.label}
</FormListItem>
))}
@@ -169,8 +168,8 @@ interface WebSearchSource {
/** `"disabled"`, `"builtin"` or the config id of a search provider. */
choice: string;
label: string;
- /** A boxicons class, or the URL of a mark drawn as a `MaskedIcon`. */
- icon: { className: string } | { url: string };
+ /** The icon class, such as `bx bx-block` or a provider's mark. */
+ icon: string;
/** Why the current model can't use the source. A source it can't use stays listed, disabled. */
unavailableReason?: string;
}
@@ -183,25 +182,19 @@ function getWebSearchSources(
const searchProviderUnavailable = webSearch.searchProviderUnavailableKey
&& t(webSearch.searchProviderUnavailableKey);
return [
- { choice: "disabled", label: t("llm_chat.web_search_disabled"), icon: { className: "bx bx-block" } },
+ { choice: "disabled", label: t("llm_chat.web_search_disabled"), icon: "bx bx-block" },
{
choice: "builtin",
label: t("llm_chat.web_search_builtin"),
// The model's own mark stands for its built-in search.
- icon: modelProvider ? { url: providerIconUrl(modelProvider) } : { className: "bx bx-globe" },
+ icon: modelProvider ? providerIcon(modelProvider) : "bx bx-globe",
unavailableReason: webSearch.builtInUnavailableKey && t(webSearch.builtInUnavailableKey)
},
...searchProviders.map((provider) => ({
choice: provider.id,
label: provider.name,
- icon: { url: providerIconUrl(provider.provider) },
+ icon: providerIcon(provider.provider),
unavailableReason: searchProviderUnavailable
}))
];
}
-
-function WebSearchSourceIcon({ source, className }: { source: WebSearchSource; className: string }) {
- return "url" in source.icon
- ? <MaskedIcon url={source.icon.url} className={className} />
- : <Icon icon={source.icon.className} className={className} />;
-}
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css
index 6c6bfcbff3..b0313481f0 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css
@@ -128,8 +128,8 @@
height: 1.4rem;
align-items: center;
- .masked-icon {
- --masked-icon-size: 0.9rem;
+ .tn-icon {
+ font-size: 0.9rem;
}
}
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.spec.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.spec.tsx
index 13bb6bb343..96199fc4f8 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.spec.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.spec.tsx
@@ -774,7 +774,7 @@ describe("ToolCallCard", () => {
const single = icon(renderCard([ viaTavily("1") ]).querySelector(".llm-chat-tool-call"));
expect(single?.getAttribute("title")).toBe("llm_chat.searched_with{\"name\":\"Tavily\"}");
- expect(single?.querySelector(".masked-icon")).not.toBeNull();
+ expect(single?.querySelector(".tn-brand-tavily")).not.toBeNull();
// A search that found nothing is a line with nothing to expand, marked the same way.
const nothingFound: ToolCall = { ...viaTavily("0"), result: JSON.stringify({ query: "trilium", searchProvider: { type: "tavily", name: "Tavily" }, sources: [] }) };
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx
index 0ba740a980..ef88383512 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx
@@ -10,9 +10,9 @@ import { t } from "../../../services/i18n.js";
import ActionButton from "../../react/ActionButton.js";
import Button, { SplitButton } from "../../react/Button.js";
import { FormListItem } from "../../react/FormList.js";
-import MaskedIcon from "../../react/MaskedIcon.js";
+import Icon from "../../react/Icon.js";
import { NewNoteLink } from "../../react/NoteLink.js";
-import { providerIconUrl } from "../options/llm/provider_icons.js";
+import { providerIcon } from "../options/llm/provider_icons.js";
import { EditNoteContentDiff, isSmallEdit, parseNoteContentEdits } from "./EditNoteContentDiff.js";
import { ExpandableSection } from "./ExpandableCard.js";
import { isFailedToolCall, type ToolCall } from "./llm_chat_types.js";
@@ -166,7 +166,7 @@ function readSearchProvider(toolCall: ToolCall): { type: string; name: string }
function SearchProviderIcon({ type, name }: { type: string; name: string }) {
return (
<span className="llm-chat-tool-call-provider" title={t("llm_chat.searched_with", { name })}>
- <MaskedIcon url={providerIconUrl(type)} />
+ <Icon icon={providerIcon(type)} />
</span>
);
}
diff --git a/apps/client/src/widgets/type_widgets/options/llm.css b/apps/client/src/widgets/type_widgets/options/llm.css
index 0533f09738..4395cdca27 100644
--- a/apps/client/src/widgets/type_widgets/options/llm.css
+++ b/apps/client/src/widgets/type_widgets/options/llm.css
@@ -16,9 +16,8 @@
white-space: nowrap;
}
-/* Scale the provider logo down to sit inline with the row label text. */
-.llm-provider-name .masked-icon {
- --masked-icon-size: 1.2em;
+.llm-provider-name .tn-icon {
+ font-size: 1.2em;
}
/* MCP endpoint list: one group per reachability scope (this device / LAN), each
diff --git a/apps/client/src/widgets/type_widgets/options/llm.tsx b/apps/client/src/widgets/type_widgets/options/llm.tsx
index 008f108618..a38ff6a143 100644
--- a/apps/client/src/widgets/type_widgets/options/llm.tsx
+++ b/apps/client/src/widgets/type_widgets/options/llm.tsx
@@ -15,7 +15,7 @@ import Collapsible from "../../react/Collapsible";
import FormTextBox from "../../react/FormTextBox";
import FormToggle from "../../react/FormToggle";
import { useTriliumOption, useTriliumOptionBool } from "../../react/hooks";
-import MaskedIcon from "../../react/MaskedIcon";
+import Icon from "../../react/Icon";
import NoItems from "../../react/NoItems";
import { shortModelName } from "../llm_chat/model_name";
import OptionsPageHeader from "./components/OptionsPageHeader";
@@ -299,7 +299,7 @@ function ProviderList({ providers, emptyIcon, emptyText, onEdit, onDelete }: Pro
key={provider.id}
label={
<span className="llm-provider-name">
- {providerType?.iconUrl && <MaskedIcon url={providerType.iconUrl} />}
+ {providerType && <Icon icon={providerType.icon} />}
{provider.name}
</span>
}
diff --git a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css
index 5b77827182..4126c61995 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css
+++ b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.css
@@ -30,8 +30,8 @@
color: var(--muted-text-color);
opacity: 0.6;
- .masked-icon {
- --masked-icon-size: 80px;
+ .tn-icon {
+ font-size: 80px;
}
}
diff --git a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.spec.ts b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.spec.ts
index 13b128fc4b..0ce6f0aeda 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.spec.ts
+++ b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.spec.ts
@@ -86,7 +86,7 @@ describe("the provider list", () => {
for (const type of PROVIDER_TYPES) {
expect(type.id, `${type.id} has an id`).toBeTruthy();
expect(type.name, `${type.id} has a name`).toBeTruthy();
- expect(type.iconUrl, `${type.id} has an icon`).toBeTruthy();
+ expect(type.icon, `${type.id} has an icon`).toBeTruthy();
}
});
diff --git a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx
index 78c1408309..c363ebbb2f 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx
+++ b/apps/client/src/widgets/type_widgets/options/llm/AddProviderModal.tsx
@@ -10,7 +10,7 @@ import { isStandalone } from "../../../../services/utils";
import { Badge } from "../../../react/Badge";
import { Card, CardSection } from "../../../react/Card";
import FormTextBox from "../../../react/FormTextBox";
-import MaskedIcon from "../../../react/MaskedIcon";
+import Icon from "../../../react/Icon";
import SelectableCard, { SelectableCardGrid } from "../../../react/SelectableCard";
import WizardModal, { type WizardStep } from "../../../react/WizardModal";
import OptionsRow from "../components/OptionsRow";
@@ -42,8 +42,8 @@ export interface ProviderType {
* that an unedited field stores no endpoint override.
*/
prefillBaseUrl?: boolean;
- /** URL of the provider's logo (an imported `*.svg?url`), rendered monochrome via a CSS mask. */
- iconUrl: string;
+ /** The icon class of the provider's mark, from {@link PROVIDER_ICONS}. */
+ icon: string;
/**
* Short blurb under the provider name, only where the name doesn't already say
* what the card is or what it needs — a prerequisite (Claude Code), or a card
@@ -127,57 +127,57 @@ const SEARCH_PROVIDER_GROUPS = [
type ProviderGroupId = (typeof PROVIDER_GROUPS)[number]["id"] | (typeof SEARCH_PROVIDER_GROUPS)[number]["id"];
export const PROVIDER_TYPES: ProviderType[] = [
- { id: "anthropic", name: "Anthropic", group: "cloud", defaultBaseUrl: "https://api.anthropic.com/v1", iconUrl: PROVIDER_ICONS.anthropic },
- { id: "openai", name: "OpenAI", group: "cloud", defaultBaseUrl: "https://api.openai.com/v1", iconUrl: PROVIDER_ICONS.openai },
- { id: "google", name: "Google Gemini", group: "cloud", defaultBaseUrl: "https://generativelanguage.googleapis.com/v1beta", iconUrl: PROVIDER_ICONS.google },
+ { id: "anthropic", name: "Anthropic", group: "cloud", defaultBaseUrl: "https://api.anthropic.com/v1", icon: PROVIDER_ICONS.anthropic },
+ { id: "openai", name: "OpenAI", group: "cloud", defaultBaseUrl: "https://api.openai.com/v1", icon: PROVIDER_ICONS.openai },
+ { id: "google", name: "Google Gemini", group: "cloud", defaultBaseUrl: "https://generativelanguage.googleapis.com/v1beta", icon: PROVIDER_ICONS.google },
// Reachable through the custom endpoint card too — it speaks the OpenAI API —
// but carded here so its models resolve against the committed price table,
// which a nameless endpoint never can.
- { id: "deepseek", name: "DeepSeek", group: "cloud", defaultBaseUrl: "https://api.deepseek.com/v1", iconUrl: PROVIDER_ICONS.deepseek },
+ { id: "deepseek", name: "DeepSeek", group: "cloud", defaultBaseUrl: "https://api.deepseek.com/v1", icon: PROVIDER_ICONS.deepseek },
// Uses the Claude Agent SDK on the server; auth belongs to Claude Code (`claude /login`),
// and usage is covered by the subscription rather than charged per token.
- { id: "claude-agent", name: "Claude Code", group: "subscription", defaultBaseUrl: "", iconUrl: PROVIDER_ICONS["claude-agent"], connectionDescription: t("llm.claude_agent_description"), apiKey: "none", baseUrl: "none", needsHostProcess: true },
+ { id: "claude-agent", name: "Claude Code", group: "subscription", defaultBaseUrl: "", icon: PROVIDER_ICONS["claude-agent"], connectionDescription: t("llm.claude_agent_description"), apiKey: "none", baseUrl: "none", needsHostProcess: true },
// The same arrangement over the GitHub Copilot CLI, driven in its ACP mode;
// auth belongs to the CLI (`copilot login`).
- { id: "copilot-agent", name: "GitHub Copilot", group: "subscription", defaultBaseUrl: "", iconUrl: PROVIDER_ICONS["copilot-agent"], connectionDescription: t("llm.copilot_agent_description"), beta: true, apiKey: "none", baseUrl: "none", needsHostProcess: true },
+ { id: "copilot-agent", name: "GitHub Copilot", group: "subscription", defaultBaseUrl: "", icon: PROVIDER_ICONS["copilot-agent"], connectionDescription: t("llm.copilot_agent_description"), beta: true, apiKey: "none", baseUrl: "none", needsHostProcess: true },
// Gemini on a Google account through Google's Antigravity ACP server; the server
// signs in itself, opening the Google sign-in page the first time models are listed.
// That sign-in runs inside the model-list request, so the request outlasts the
// server's own 5-minute wait for it (`SIGN_IN_TIMEOUT_MS`).
- { id: "antigravity-agent", name: "Google Antigravity", group: "subscription", defaultBaseUrl: "", iconUrl: PROVIDER_ICONS["antigravity-agent"], connectionDescription: t("llm.antigravity_agent_description"), beta: true, apiKey: "none", baseUrl: "none", needsHostProcess: true, modelListTimeoutMs: 6 * 60_000 },
+ { id: "antigravity-agent", name: "Google Antigravity", group: "subscription", defaultBaseUrl: "", icon: PROVIDER_ICONS["antigravity-agent"], connectionDescription: t("llm.antigravity_agent_description"), beta: true, apiKey: "none", baseUrl: "none", needsHostProcess: true, modelListTimeoutMs: 6 * 60_000 },
// A ChatGPT plan through the Codex ACP adapter, which signs in the same way.
- { id: "codex-agent", name: "OpenAI Codex", group: "subscription", defaultBaseUrl: "", iconUrl: PROVIDER_ICONS["codex-agent"], connectionDescription: t("llm.codex_agent_description"), beta: true, apiKey: "none", baseUrl: "none", needsHostProcess: true, modelListTimeoutMs: 6 * 60_000 },
+ { id: "codex-agent", name: "OpenAI Codex", group: "subscription", defaultBaseUrl: "", icon: PROVIDER_ICONS["codex-agent"], connectionDescription: t("llm.codex_agent_description"), beta: true, apiKey: "none", baseUrl: "none", needsHostProcess: true, modelListTimeoutMs: 6 * 60_000 },
// The three self-hosted cards share one server-side provider; they differ only in
// the endpoint they prefill and the setup hint they show.
// No blurbs: the group heading already says local/self-hosted, and how to start
// each server belongs on the connection step, where the setup hints live.
{
id: "ollama", name: "Ollama", group: "local", defaultBaseUrl: "http://localhost:11434", prefillBaseUrl: true,
- iconUrl: PROVIDER_ICONS.ollama,
+ icon: PROVIDER_ICONS.ollama,
setupHintKey: "llm.setup_hint_ollama", apiKey: "none", baseUrl: "required"
},
{
id: "lmstudio", name: "LM Studio", group: "local", defaultBaseUrl: "http://localhost:1234/v1", prefillBaseUrl: true,
- iconUrl: PROVIDER_ICONS.lmstudio,
+ icon: PROVIDER_ICONS.lmstudio,
setupHintKey: "llm.setup_hint_lmstudio", apiKey: "none", baseUrl: "required"
},
{
id: "openai-compatible", name: t("llm.provider_openai_compatible"), group: "custom", defaultBaseUrl: "http://localhost:8080/v1",
- iconUrl: PROVIDER_ICONS["openai-compatible"], description: t("llm.provider_desc_openai_compatible"),
+ icon: PROVIDER_ICONS["openai-compatible"], description: t("llm.provider_desc_openai_compatible"),
setupHintKey: "llm.setup_hint_openai_compatible", apiKey: "optional", baseUrl: "required"
}
];
/** Web search services, configured in the same `llmProviders` option with `kind: "search"`. */
export const SEARCH_PROVIDER_TYPES: ProviderType[] = [
- { id: "brave", name: "Brave Search", group: "search-cloud", defaultBaseUrl: "https://api.search.brave.com/res/v1", iconUrl: PROVIDER_ICONS.brave, refusesBrowserRequests: true },
- { id: "tavily", name: "Tavily", group: "search-cloud", defaultBaseUrl: "https://api.tavily.com", iconUrl: PROVIDER_ICONS.tavily },
- { id: "exa", name: "Exa", group: "search-cloud", defaultBaseUrl: "https://api.exa.ai", iconUrl: PROVIDER_ICONS.exa, refusesBrowserRequests: true },
- { id: "serper", name: "Serper", group: "search-cloud", defaultBaseUrl: "https://google.serper.dev", iconUrl: PROVIDER_ICONS.serper },
- { id: "perplexity", name: "Perplexity", group: "search-cloud", defaultBaseUrl: "https://api.perplexity.ai", iconUrl: PROVIDER_ICONS.perplexity, refusesBrowserRequests: true },
+ { id: "brave", name: "Brave Search", group: "search-cloud", defaultBaseUrl: "https://api.search.brave.com/res/v1", icon: PROVIDER_ICONS.brave, refusesBrowserRequests: true },
+ { id: "tavily", name: "Tavily", group: "search-cloud", defaultBaseUrl: "https://api.tavily.com", icon: PROVIDER_ICONS.tavily },
+ { id: "exa", name: "Exa", group: "search-cloud", defaultBaseUrl: "https://api.exa.ai", icon: PROVIDER_ICONS.exa, refusesBrowserRequests: true },
+ { id: "serper", name: "Serper", group: "search-cloud", defaultBaseUrl: "https://google.serper.dev", icon: PROVIDER_ICONS.serper },
+ { id: "perplexity", name: "Perplexity", group: "search-cloud", defaultBaseUrl: "https://api.perplexity.ai", icon: PROVIDER_ICONS.perplexity, refusesBrowserRequests: true },
{
id: "searxng", name: "SearXNG", group: "search-local", defaultBaseUrl: "http://localhost:8888", prefillBaseUrl: true,
- iconUrl: PROVIDER_ICONS.searxng,
+ icon: PROVIDER_ICONS.searxng,
setupHintKey: "llm.setup_hint_searxng", apiKey: "optional", baseUrl: "required"
}
];
@@ -483,7 +483,7 @@ export default function AddProviderModal({ show, onHidden, onSave, existingProvi
function ProviderIllustration({ providerType }: { providerType: ProviderType }) {
return (
<div className="add-provider-illustration">
- <MaskedIcon url={providerType.iconUrl} />
+ <Icon icon={providerType.icon} />
</div>
);
}
@@ -522,7 +522,7 @@ function ProviderGroup({ heading, description, columns, providers, selectedProvi
return (
<SelectableCard
key={provider.id}
- iconUrl={provider.iconUrl}
+ icon={provider.icon}
title={provider.beta
? <span className="add-provider-card-heading">{provider.name}<Badge text={t("llm.beta")} className="add-provider-beta-badge" outline /></span>
: provider.name}
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/anthropic.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/anthropic.svg
deleted file mode 100644
index 5b81844cbd..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/anthropic.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Anthropic</title><path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/antigravity.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/antigravity.svg
deleted file mode 100644
index 784fc63dbe..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/antigravity.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Antigravity</title><path d="M21.751 22.607c1.34 1.005 3.35.335 1.508-1.508C17.73 15.74 18.904 1 12.037 1 5.17 1 6.342 15.74.815 21.1c-2.01 2.009.167 2.511 1.507 1.506 5.192-3.517 4.857-9.714 9.715-9.714 4.857 0 4.522 6.197 9.714 9.715z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/brave.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/brave.svg
deleted file mode 100644
index 639299e78c..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/brave.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Brave</title><path d="M17.544 2.375c.017-.005 1.844-.5 2.712.361.872.872 1.588 1.642 1.588 1.642l-.565 1.38v-.003.006-.003L22 7.8c-.014.05-2.112 7.983-2.357 8.954-.488 1.924-.819 2.663-2.202 3.638a212.634 212.634 0 01-4.305 2.917c-.41.252-.92.691-1.383.691-.463 0-.974-.439-1.383-.691a213.099 213.099 0 01-4.306-2.917c-1.383-.975-1.72-1.714-2.2-3.632-.246-.977-2.35-8.904-2.364-8.96l.722-2.045-.566-1.383s.722-.764 1.594-1.63c.866-.872 2.712-.36 2.712-.36L8.066 0h7.373l2.105 2.375zm-5.797 12.557c-.138 0-1.04.318-1.762.691l-.457.234c-.487.253-.823.428-.956.506-.168.108-.066.306.09.414.15.103 2.195 1.684 2.394 1.865l.09.078c.186.168.432.391.607.391.174 0 .415-.223.607-.391l.084-.078c.2-.169 2.244-1.756 2.394-1.865.15-.108.258-.3.09-.408-.133-.084-.475-.253-.956-.506h-.006l-.457-.24c-.722-.373-1.623-.691-1.762-.691zm.006-11.276c-.35.02-.694.092-1.023.211l-.378.126c-.493.169-.969.331-1.21.331-.312 0-2.554-.428-2.584-.433 0 0-2.706 3.26-2.706 3.957 0 .577.228.805.504 1.07l.174.175 2.033 2.152.06.067c.204.204.5.498.29.998l-.043.102c-.228.535-.511 1.203-.15 1.876.384.716 1.046 1.19 1.467 1.118.42-.084 1.419-.601 1.78-.841.367-.229 1.52-1.19 1.521-1.551 0-.307-.829-.812-1.238-1.053l-.18-.12-.199-.12c-.367-.229-1.035-.644-1.047-.825-.018-.228-.017-.294.283-.853l.21-.379c.289-.487.602-1.029.536-1.426-.085-.433-.777-.685-1.36-.901l-.21-.078-.613-.229c-.583-.222-1.232-.463-1.34-.511-.145-.073-.11-.132.335-.174l.223-.025c.553-.06 1.582-.168 2.08-.03l.32.09c.564.145 1.25.337 1.316.445l.03.048c.067.09.109.145.037.53l-.121.607c-.15.806-.391 2.069-.421 2.351l-.012.115c-.042.312-.066.529.301.613.438.119.884.206 1.335.259.216 0 .824-.144 1.24-.24l.095-.025c.367-.078.343-.289.3-.602l-.011-.12c-.03-.282-.27-1.54-.42-2.345l-.122-.614c-.072-.384-.024-.439.036-.529l.03-.048c.067-.108.753-.294 1.318-.444l.318-.091c.5-.138 1.528-.03 2.081.03l.216.018c.451.048.493.108.343.18-.11.049-.758.29-1.341.512-.273.108-.547.21-.823.307-.583.216-1.275.468-1.36.907-.066.391.247.939.535 1.42l.21.379c.301.56.308.625.284.854-.012.18-.68.595-1.053.824l-.192.126-.181.108c-.41.247-1.238.758-1.238 1.059 0 .367 1.16 1.316 1.521 1.55.367.235 1.36.758 1.78.836.421.078 1.082-.396 1.467-1.112.36-.673.078-1.335-.15-1.876l-.042-.102c-.21-.5.084-.794.289-1.004l.065-.06 2.02-2.147.181-.181c.271-.265.505-.493.505-1.07 0-.698-2.706-3.957-2.706-3.957-.03.006-2.275.44-2.586.44l.007-.007c-.252 0-.722-.156-1.215-.337l-.379-.12c-.612-.21-1.02-.21-1.022-.21z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/claude-ai.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/claude-ai.svg
deleted file mode 100644
index aeb2a3ec37..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/claude-ai.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Claude Code</title><path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/codex.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/codex.svg
deleted file mode 100644
index 4c648aff4a..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/codex.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Codex</title><path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/deepseek.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/deepseek.svg
deleted file mode 100644
index dc224e43a4..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/deepseek.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>DeepSeek</title><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/exa.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/exa.svg
deleted file mode 100644
index 85ddb9be1c..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/exa.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Exa</title><path clip-rule="evenodd" d="M3 0h19v1.791L13.892 12 22 22.209V24H3V0zm9.62 10.348l6.589-8.557H6.03l6.59 8.557zM5.138 3.935v7.17h5.52l-5.52-7.17zm5.52 8.96h-5.52v7.17l5.52-7.17zM6.03 22.21l6.59-8.557 6.589 8.557H6.03z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/gemini.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/gemini.svg
deleted file mode 100644
index 87736bbe09..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/gemini.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/github-copilot.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/github-copilot.svg
deleted file mode 100644
index 3cbf22a599..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/github-copilot.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>GithubCopilot</title><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/lmstudio.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/lmstudio.svg
deleted file mode 100644
index ea0816b63f..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/lmstudio.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>LM Studio</title><path d="M2.84 2a1.273 1.273 0 100 2.547h14.107a1.273 1.273 0 100-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H22.04a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h14.106a1.274 1.274 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H15.38a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h14.106a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h9.698a1.273 1.273 0 100-2.547h-9.698z" fill-opacity=".3"></path><path d="M2.84 2a1.273 1.273 0 100 2.547h10.287a1.274 1.274 0 000-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H18.22a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H11.56a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h5.78a1.273 1.273 0 100-2.547h-5.78z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/ollama.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/ollama.svg
deleted file mode 100644
index cc887e3dcf..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/ollama.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Ollama</title><path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/openai.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/openai.svg
deleted file mode 100644
index 78caf4fa20..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/openai.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/perplexity.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/perplexity.svg
deleted file mode 100644
index f7c917ca5c..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/perplexity.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Perplexity</title><path d="M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/robot.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/robot.svg
deleted file mode 100644
index fe8d50611c..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/robot.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="24" height="24" fill="currentColor" viewBox="0 0 24 24" transform="" id="injected-svg" xmlns="http://www.w3.org/2000/svg"><!--Boxicons v3.0.8 https://boxicons.com | License https://docs.boxicons.com/free--><path d="M8.5 10a1.5 2 0 1 0 0 4 1.5 2 0 1 0 0-4m7 0a1.5 2 0 1 0 0 4 1.5 2 0 1 0 0-4M8 16h8v2H8z"></path><path d="M21 11V8c0-1.1-.9-2-2-2h-6V4.61c.3-.27.5-.67.5-1.11 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .44.2.84.5 1.11V6H5c-1.1 0-2 .9-2 2v3c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1v3c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-3c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1M5 20V8h14v12z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/searxng.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/searxng.svg
deleted file mode 100644
index 7873fdee61..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/searxng.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>SearXNG</title><path d="M6.638 4.38a5.35 5.35 0 017.747 3.963 5.35 5.35 0 01-.56 3.284l-1.154-.61A4.044 4.044 0 007.237 5.54l-.6-1.158z"></path><path clip-rule="evenodd" d="M9.13 0a9.13 9.13 0 017.992 13.546l6.803 6.515-3.4 3.551-6.853-6.562A9.13 9.13 0 119.13 0zm0 2.61a6.521 6.521 0 100 13.042 6.521 6.521 0 000-13.043z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/serper.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/serper.svg
deleted file mode 100644
index 94c12831b7..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/serper.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Serper</title><g transform="matrix(0.0034285714 0 0 -0.0034285714 0 24)"><path d="M3278 6996 c-1 -2 -39 -6 -83 -10 -798 -62 -1601 -438 -2176 -1019 -293 -296 -553 -671 -704 -1017 -25 -58 -50 -114 -55 -125 -45 -93 -150 -427 -176 -560 -2 -11 -10 -54 -19 -95 -22 -115 -30 -160 -41 -255 -26 -230 -26 -666 1 -826 2 -13 6 -46 9 -74 9 -78 22 -152 51 -285 21 -96 91 -339 114 -395 5 -11 25 -65 46 -120 63 -166 249 -531 312 -610 4 -6 34 -49 65 -95 261 -390 673 -772 1113 -1032 373 -221 845 -385 1274 -444 25 -3 57 -8 71 -10 163 -25 682 -25 842 1 13 2 46 7 73 10 71 10 87 13 115 18 14 3 43 8 65 12 325 59 741 212 1039 384 49 28 91 51 93 51 10 0 268 180 353 247 152 119 324 280 450 422 36 41 70 79 76 85 65 68 263 353 352 508 46 79 172 331 172 342 0 3 11 29 24 58 57 127 151 421 182 573 16 77 54 301 60 350 4 33 9 76 11 95 8 69 10 517 3 595 -14 151 -21 210 -25 225 -2 8 -7 35 -10 60 -17 129 -80 384 -136 552 -349 1039 -1171 1861 -2209 2207 -174 58 -415 118 -550 136 -19 3 -46 7 -60 10 -13 2 -54 7 -90 11 -36 3 -76 8 -90 11 -27 5 -536 14 -542 9z m522 -609 c14 -3 77 -13 140 -22 965 -137 1833 -807 2224 -1718 67 -156 141 -383 162 -497 3 -14 7 -33 10 -42 6 -20 9 -34 24 -128 6 -41 13 -86 16 -100 25 -157 26 -619 0 -755 -2 -11 -6 -41 -10 -66 -59 -406 -227 -834 -463 -1182 -142 -208 -336 -426 -513 -576 -30 -25 -60 -51 -67 -57 -37 -35 -228 -168 -326 -227 -291 -176 -694 -329 -982 -371 -22 -3 -51 -8 -65 -11 -35 -7 -93 -14 -180 -23 -91 -9 -473 -8 -550 1 -124 14 -161 20 -280 43 -69 14 -132 27 -141 29 -56 12 -260 76 -304 95 -11 4 -51 20 -88 34 -145 56 -361 169 -489 257 -31 22 -61 39 -66 39 -6 0 -12 3 -14 8 -1 4 -47 40 -100 80 -208 156 -414 368 -587 601 -112 152 -217 336 -315 554 -71 158 -170 486 -191 632 -1 11 -5 36 -9 55 -7 39 -11 70 -23 180 -15 146 -8 545 11 660 3 14 7 43 10 65 4 22 8 51 11 65 2 14 6 36 9 50 40 242 165 584 309 845 42 76 162 266 189 300 5 6 47 58 94 117 107 134 297 325 430 431 356 286 731 468 1184 575 81 20 105 24 195 37 22 3 49 7 60 10 11 2 56 7 100 11 44 4 82 8 84 10 5 5 474 -4 501 -9z"></path><path d="M3437 5244 c-1 -1 -29 -5 -62 -9 -215 -24 -402 -80 -591 -175 -351 -178 -559 -442 -591 -750 -30 -294 40 -488 249 -685 96 -91 185 -151 306 -207 81 -37 234 -92 285 -102 12 -2 42 -9 67 -15 59 -13 80 -17 240 -41 74 -11 146 -22 160 -24 14 -3 61 -10 105 -16 44 -7 87 -13 95 -15 8 -2 36 -6 62 -9 26 -4 91 -18 145 -32 54 -14 105 -27 113 -29 38 -8 205 -77 246 -101 71 -42 159 -129 184 -181 55 -117 24 -294 -74 -417 -101 -127 -363 -252 -591 -282 -27 -3 -59 -8 -70 -10 -28 -6 -265 -6 -295 0 -14 3 -44 7 -67 10 -105 12 -268 66 -369 122 -79 44 -127 79 -191 141 -78 76 -114 124 -163 219 -49 94 -75 123 -138 155 -90 45 -198 28 -271 -43 -84 -82 -97 -184 -40 -303 32 -65 83 -156 101 -180 4 -5 29 -37 55 -70 229 -288 583 -478 993 -533 73 -9 400 -9 470 2 541 78 978 372 1117 751 73 197 65 468 -18 642 -160 338 -532 541 -1129 617 -19 3 -78 11 -130 20 -52 8 -113 17 -135 21 -23 3 -50 7 -62 9 -11 3 -38 7 -59 11 -78 12 -100 16 -159 31 -202 52 -354 125 -445 215 -78 76 -104 136 -102 234 4 243 263 448 657 521 163 31 455 21 526 -16 10 -6 26 -10 36 -10 56 0 296 -149 358 -222 46 -54 82 -107 110 -162 40 -78 93 -130 158 -154 156 -59 319 55 321 223 0 52 -6 73 -47 155 -175 353 -547 607 -997 681 -62 10 -354 21 -363 13z"></path></g></svg>
diff --git a/apps/client/src/widgets/type_widgets/options/llm/icons/tavily.svg b/apps/client/src/widgets/type_widgets/options/llm/icons/tavily.svg
deleted file mode 100644
index 458b2143a5..0000000000
--- a/apps/client/src/widgets/type_widgets/options/llm/icons/tavily.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Tavily</title><path d="M8.033 14.273a1.612 1.612 0 011.139.47l.04.042.044.043a1.61 1.61 0 010 2.277l-3.073 3.073.816.816c.6.6.303 1.627-.525 1.814l-5.159 1.165a1.07 1.07 0 01-.897-.2l-.102-.09a1.07 1.07 0 01-.289-1l1.164-5.158A1.079 1.079 0 013.006 17l.816.817 3.074-3.074a1.612 1.612 0 011.137-.47zM17.042 13.246c0-.85.935-1.366 1.653-.912l4.47 2.824c.336.212.503.562.503.911 0 .35-.167.7-.501.913l-4.472 2.824a1.079 1.079 0 01-1.654-.912v-1.155h-7.027c.37-.4.605-.902.677-1.438l.022-.232a2.65 2.65 0 00-.492-1.669h6.821v-1.154zM8.188 0c.35 0 .7.168.913.503l2.823 4.47a1.079 1.079 0 01-.911 1.655H9.857v6.692h-1.67a2.633 2.633 0 00-1.668.48V6.629H5.365c-.849 0-1.366-.936-.912-1.654L7.276.503A1.072 1.072 0 018.188 0z"></path></svg>
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/options/llm/provider_icons.spec.ts b/apps/client/src/widgets/type_widgets/options/llm/provider_icons.spec.ts
index b7786a4057..603a481c97 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/provider_icons.spec.ts
+++ b/apps/client/src/widgets/type_widgets/options/llm/provider_icons.spec.ts
@@ -1,25 +1,40 @@
+import fs from "fs";
+import path from "path";
import { describe, expect, it } from "vitest";
-import { PROVIDER_ICONS, providerIconUrl } from "./provider_icons.js";
+import { PROVIDER_ICONS, providerIcon } from "./provider_icons.js";
-describe("providerIconUrl", () => {
+describe("providerIcon", () => {
it("resolves every provider type in the table to its own mark", () => {
// Driven off the table rather than a hardcoded list, so a provider added
// without a mark (or pointed at the wrong one) fails here.
- const urls = Object.entries(PROVIDER_ICONS);
- expect(urls.length).toBeGreaterThan(0);
- for (const [provider, url] of urls) {
- expect(providerIconUrl(provider)).toBe(url);
+ const icons = Object.entries(PROVIDER_ICONS);
+ expect(icons.length).toBeGreaterThan(0);
+ for (const [ provider, icon ] of icons) {
+ expect(providerIcon(provider)).toBe(icon);
}
});
+ it("names only marks the brand icon pack has a glyph for", () => {
+ const manifestPath = path.join(__dirname,
+ "../../../../../../../packages/trilium-core/src/services/icon_pack_brands.json");
+ const { icons } = JSON.parse(fs.readFileSync(manifestPath, "utf-8")) as {
+ icons: Record<string, unknown>;
+ };
+ const brandClasses = Object.values(PROVIDER_ICONS)
+ .filter((icon) => icon.startsWith("tn-brand "))
+ .map((icon) => icon.slice("tn-brand ".length));
+ expect(brandClasses.length).toBeGreaterThan(0);
+ expect(brandClasses.filter((name) => !icons[name])).toStrictEqual([]);
+ });
+
it("falls back to the generic mark rather than returning nothing", () => {
// A gap would misalign the row, so anything unrecognised still gets a glyph:
// a provider added in a newer version, a config restored from one, or a
// legacy config that never recorded a type at all.
const generic = PROVIDER_ICONS["openai-compatible"];
- expect(providerIconUrl("some-provider-from-the-future")).toBe(generic);
- expect(providerIconUrl(undefined)).toBe(generic);
- expect(providerIconUrl("")).toBe(generic);
+ expect(providerIcon("some-provider-from-the-future")).toBe(generic);
+ expect(providerIcon(undefined)).toBe(generic);
+ expect(providerIcon("")).toBe(generic);
});
});
diff --git a/apps/client/src/widgets/type_widgets/options/llm/provider_icons.ts b/apps/client/src/widgets/type_widgets/options/llm/provider_icons.ts
index a7d2dde460..0b07750da4 100644
--- a/apps/client/src/widgets/type_widgets/options/llm/provider_icons.ts
+++ b/apps/client/src/widgets/type_widgets/options/llm/provider_icons.ts
@@ -6,54 +6,34 @@
* id — two Ollama configurations show the same mark, which is why the model picker keeps its
* per-configuration group headers rather than relying on the icon alone to tell them apart.
*
- * Rendered through `MaskedIcon`, so these are tinted monochrome with `currentColor` rather
- * than shown in brand colours: the shape is what distinguishes them, and monochrome sits
- * with the rest of Trilium's chrome.
+ * The marks are glyphs of the built-in `tn-brand` icon pack, built from the SVGs in
+ * `apps/icon-pack-builder/brand-icons`.
*/
-
-import anthropicIcon from "./icons/anthropic.svg?url";
-import antigravityIcon from "./icons/antigravity.svg?url";
-import braveIcon from "./icons/brave.svg?url";
-import claudeAgentIcon from "./icons/claude-ai.svg?url";
-import codexIcon from "./icons/codex.svg?url";
-import deepseekIcon from "./icons/deepseek.svg?url";
-import exaIcon from "./icons/exa.svg?url";
-import geminiIcon from "./icons/gemini.svg?url";
-import githubCopilotIcon from "./icons/github-copilot.svg?url";
-import lmStudioIcon from "./icons/lmstudio.svg?url";
-import ollamaIcon from "./icons/ollama.svg?url";
-import openaiIcon from "./icons/openai.svg?url";
-import perplexityIcon from "./icons/perplexity.svg?url";
-import openAiCompatibleIcon from "./icons/robot.svg?url";
-import searxngIcon from "./icons/searxng.svg?url";
-import serperIcon from "./icons/serper.svg?url";
-import tavilyIcon from "./icons/tavily.svg?url";
-
export const PROVIDER_ICONS: Record<string, string> = {
- anthropic: anthropicIcon,
- "antigravity-agent": antigravityIcon,
- brave: braveIcon,
- "claude-agent": claudeAgentIcon,
- "codex-agent": codexIcon,
- "copilot-agent": githubCopilotIcon,
- deepseek: deepseekIcon,
- exa: exaIcon,
- google: geminiIcon,
- lmstudio: lmStudioIcon,
- ollama: ollamaIcon,
- openai: openaiIcon,
- "openai-compatible": openAiCompatibleIcon,
- perplexity: perplexityIcon,
- searxng: searxngIcon,
- serper: serperIcon,
- tavily: tavilyIcon
+ "anthropic": "tn-brand tn-brand-anthropic",
+ "antigravity-agent": "tn-brand tn-brand-antigravity",
+ "brave": "tn-brand tn-brand-brave",
+ "claude-agent": "tn-brand tn-brand-claude",
+ "codex-agent": "tn-brand tn-brand-codex",
+ "copilot-agent": "tn-brand tn-brand-github-copilot",
+ "deepseek": "tn-brand tn-brand-deepseek",
+ "exa": "tn-brand tn-brand-exa",
+ "google": "tn-brand tn-brand-gemini",
+ "lmstudio": "tn-brand tn-brand-lmstudio",
+ "ollama": "tn-brand tn-brand-ollama",
+ "openai": "tn-brand tn-brand-openai",
+ "openai-compatible": "bx bx-bot",
+ "perplexity": "tn-brand tn-brand-perplexity",
+ "searxng": "tn-brand tn-brand-searxng",
+ "serper": "tn-brand tn-brand-serper",
+ "tavily": "tn-brand tn-brand-tavily"
};
/**
- * The mark for a provider type, falling back to the generic one so a provider added later —
- * or a configuration restored from a newer version — still gets a glyph rather than a gap
+ * The icon class of a provider type's mark, falling back to the generic one so a provider added
+ * later — or a configuration restored from a newer version — still gets a glyph rather than a gap
* that would misalign the row.
*/
-export function providerIconUrl(provider: string | undefined): string {
- return (provider && PROVIDER_ICONS[provider]) || openAiCompatibleIcon;
+export function providerIcon(provider: string | undefined): string {
+ return (provider && PROVIDER_ICONS[provider]) || PROVIDER_ICONS["openai-compatible"];
}