feat: add tool popularity and icons

This commit is contained in:
2026-08-24 09:16:29 +05:00
parent 68476c3b8c
commit 76f1770286
7 changed files with 189 additions and 0 deletions
+10
View File
@@ -88,6 +88,8 @@ export type ToolEntry = {
img: PixelImage,
params: Record<string, unknown>
) => Promise<PixelImage> | PixelImage;
popularity?: number;
icon?: string;
resultType?: 'image' | 'info' | 'text';
output?: OutputFormat;
};
@@ -803,6 +805,14 @@ export const TOOLS: ToolEntry[] = [
}
];
import { TOOL_ICONS } from './tools/tool-icons';
import { TOOL_POPULARITY } from './tools/tool-popularity';
for (const entry of TOOLS) {
entry.icon = entry.id;
entry.popularity = TOOL_POPULARITY[entry.id] ?? 50;
}
export function getTool(id: string): ToolEntry | undefined {
return TOOLS.find((tool) => tool.id === id);
}