refactor: use ToolContent

This commit is contained in:
Ibrahima G. Coulibaly
2025-03-09 01:22:23 +00:00
parent a279c442ec
commit 8661fabe7d
8 changed files with 151 additions and 134 deletions

View File

@@ -10,6 +10,7 @@ interface ToolOptions {
name: string;
description: string;
shortDescription: string;
longDescription?: string;
}
export type ToolCategory =
@@ -32,7 +33,8 @@ export interface DefinedTool {
}
export interface ToolComponentProps {
title?: any;
title: string;
longDescription?: string;
}
export const defineTool = (
@@ -46,7 +48,8 @@ export const defineTool = (
description,
keywords,
component,
shortDescription
shortDescription,
longDescription
} = options;
const Component = component;
return {
@@ -65,7 +68,7 @@ export const defineTool = (
icon={icon}
type={basePath}
>
<Component title={name} />
<Component title={name} longDescription={longDescription} />
</ToolLayout>
);
}