feat: add tool search component, add chainable flag

This commit is contained in:
2026-08-23 21:55:45 +05:00
parent ce7f5ff680
commit c93a8e493e
5 changed files with 348 additions and 83 deletions
+4
View File
@@ -92,6 +92,10 @@ export type ToolEntry = {
export const PNG_OUTPUT: OutputFormat = { mime: 'image/png', ext: 'png' };
export function isChainable(tool: ToolEntry): boolean {
return (tool.resultType ?? 'image') === 'image' && (!tool.sourceMode || tool.sourceMode === 'file');
}
function num(params: Record<string, unknown>, id: string): number {
const v = params[id];
if (typeof v !== 'number' || !Number.isFinite(v)) {