wip: desktop work

This commit is contained in:
Adam
2025-10-30 07:26:06 -05:00
parent 3541fdcb20
commit 30f4c2cf4c
17 changed files with 427 additions and 789 deletions

View File

@@ -0,0 +1,33 @@
import { Component } from "solid-js"
export interface ToolProps {
input: Record<string, any>
metadata: Record<string, any>
tool: string
output?: string
hideDetails?: boolean
}
export type ToolComponent = Component<ToolProps>
const state: Record<
string,
{
name: string
render?: ToolComponent
}
> = {}
export function registerTool(input: { name: string; render?: ToolComponent }) {
state[input.name] = input
return input
}
export function getTool(name: string) {
return state[name]?.render
}
export const ToolRegistry = {
register: registerTool,
render: getTool,
}