mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-06-12 19:55:19 +02:00
Fix community assistant parsing errors
This commit is contained in:
parent
9dee558333
commit
09060d6866
1 changed files with 5 additions and 2 deletions
|
|
@ -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`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue