Files
llama.cpp-xrip/tools/ui/src/lib/utils/tool-ui.ts
T
Aleksander Grygier 0021a77de0 ui: Refactor Built-In Tools naming (Server/Browser) (#27271)
* server: rename built-in tools to server tools

* ui: rename built-in tools to server/browser tools
2026-08-17 22:23:22 +02:00

14 lines
451 B
TypeScript

import { TOOL_UI } from '$lib/constants';
import type { ToolUiEntry } from '$lib/types';
/**
* Resolve the UI metadata (label + icon) for a server or browser tool by its
* name. Falls back to null for unknown tools so callers can render a generic
* chrome instead.
*/
export function getToolUi(toolName: string | undefined): ToolUiEntry | null {
if (!toolName) return null;
return (TOOL_UI as Record<string, ToolUiEntry>)[toolName] ?? null;
}