char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierui: Refactor Built-In Tools naming (Server/Browser) (#27271)0021a77de

char/aliceai-t5-moe
451 B13 linesraw
1import { TOOL_UI } from '$lib/constants';
2import type { ToolUiEntry } from '$lib/types';
3
4/**
5 * Resolve the UI metadata (label + icon) for a server or browser tool by its
6 * name. Falls back to null for unknown tools so callers can render a generic
7 * chrome instead.
8 */
9export function getToolUi(toolName: string | undefined): ToolUiEntry | null {
10	if (!toolName) return null;
11
12	return (TOOL_UI as Record<string, ToolUiEntry>)[toolName] ?? null;
13}