diff --git a/apps/shinkai-desktop/src/components/tools/js-tool.tsx b/apps/shinkai-desktop/src/components/tools/js-tool.tsx index 65f17d4dc..0a95840db 100644 --- a/apps/shinkai-desktop/src/components/tools/js-tool.tsx +++ b/apps/shinkai-desktop/src/components/tools/js-tool.tsx @@ -128,8 +128,8 @@ export default function JsTool({ .filter((item) => !!item) .map(({ label, value }) => (
- {label}( - {value}) + {label} + {value}
))} diff --git a/apps/shinkai-desktop/src/components/tools/tool-details.tsx b/apps/shinkai-desktop/src/components/tools/tool-details.tsx index 0f3295936..6538af1eb 100644 --- a/apps/shinkai-desktop/src/components/tools/tool-details.tsx +++ b/apps/shinkai-desktop/src/components/tools/tool-details.tsx @@ -4,8 +4,10 @@ import { WorkflowShinkaiTool, } from '@shinkai_network/shinkai-message-ts/models/SchemaTypes'; import { useGetTool } from '@shinkai_network/shinkai-node-state/lib/queries/getTool/useGetTool'; +import { Skeleton } from '@shinkai_network/shinkai-ui'; import { useParams } from 'react-router-dom'; +import { SubpageLayout } from '../../pages/layout/simple-layout'; import { useAuth } from '../../store/auth'; import JsTool from './js-tool'; import WorkflowTool from './workflow-tool'; @@ -23,7 +25,7 @@ export default function ToolDetails() { const { toolKey } = useParams(); - const { data, isSuccess } = useGetTool({ + const { data, isSuccess, isPending } = useGetTool({ nodeAddress: auth?.node_address ?? '', toolKey: toolKey ?? '', shinkaiIdentity: auth?.shinkai_identity ?? '', @@ -38,6 +40,26 @@ export default function ToolDetails() { const tool = data?.content[0] as ShinkaiTool; const isEnabled = data?.content[1] as boolean; + if (isPending) { + return ( + } + > +
+
+ + +
+ + + + +
+
+ ); + } + if (isSuccess && isWorkflowShinkaiTool(tool)) { return ; } else if (isSuccess && isJSShinkaiTool(tool)) { diff --git a/apps/shinkai-desktop/src/pages/tools.tsx b/apps/shinkai-desktop/src/pages/tools.tsx index fd4e86594..c2553be58 100644 --- a/apps/shinkai-desktop/src/pages/tools.tsx +++ b/apps/shinkai-desktop/src/pages/tools.tsx @@ -68,7 +68,7 @@ export const Tools = () => { const { mutateAsync: updateTool } = useUpdateTool(); return ( - +