Datasets:
File size: 615 Bytes
8d88d9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import type { Tool } from "$lib/types/Tool";
/**
* Checks if a tool's name equals a value. Replaces all hyphens with underscores before comparison
* since some models return underscores even when hyphens are used in the request.
**/
export function toolHasName(name: string, tool: Pick<Tool, "name">): boolean {
return tool.name.replaceAll("-", "_") === name.replaceAll("-", "_");
}
export const colors = ["purple", "blue", "green", "yellow", "red"] as const;
export const icons = [
"wikis",
"tools",
"camera",
"code",
"email",
"cloud",
"terminal",
"game",
"chat",
"speaker",
"video",
] as const;
|