From 09060d6866281293c463d53677bba8c44f40f14c Mon Sep 17 00:00:00 2001 From: akhisud3195 Date: Mon, 15 Sep 2025 16:30:35 +0400 Subject: [PATCH] Fix community assistant parsing errors --- .../app/projects/components/build-assistant-section.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/rowboat/app/projects/components/build-assistant-section.tsx b/apps/rowboat/app/projects/components/build-assistant-section.tsx index 554e4aea..b3e8fd5d 100644 --- a/apps/rowboat/app/projects/components/build-assistant-section.tsx +++ b/apps/rowboat/app/projects/components/build-assistant-section.tsx @@ -142,9 +142,12 @@ export function BuildAssistantSection() { } }); } else if (template.type === 'community') { - // Handle community template import + // Fetch full workflow for community template, then create from JSON + const res = await fetch(`/api/assistant-templates/${template.id}`); + if (!res.ok) throw new Error('Failed to fetch community template details'); + const data = await res.json(); await createProjectFromJsonWithOptions({ - workflowJson: JSON.stringify(template.workflow), + workflowJson: JSON.stringify(data.workflow), router, onSuccess: (projectId) => { router.push(`/projects/${projectId}/workflow`);