Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
Add workflow page with flow renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
faltawy committed Dec 7, 2023
1 parent ea111b1 commit cbe3cfb
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { FlowRenderer } from '@/components/domain/new-flows-editor/Renderer'
import React from 'react'


export default function WorkflowPage() {
return (
<FlowRenderer />
)
}
36 changes: 33 additions & 3 deletions dashboard/app/(copilot)/copilot/[copilot_id]/workflow/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
import { FlowRenderer } from '@/components/domain/new-flows-editor/Renderer'
import { HeaderShell } from '@/components/domain/HeaderShell'
import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'

import { Workflow } from 'lucide-react'
import React from 'react'
import CreateWorkflowForm from './_parts/CreateWorkflowForm'
import WorkflowsTable from './_parts/WorkflowsTable'

type Props = {
params: {
copilot_id: string;
}
}

export default function WorkflowPage() {
export default function ListWorkflows({ params }: Props) {
const baseUrl = `/copilot/${params.copilot_id}/workflow`;
return (
<FlowRenderer />
<div>
<HeaderShell className='justify-between'>
<div className='flex items-center gap-2'>
<Workflow size={24} />
<h1 className='text-lg font-semibold'>Flows</h1>
</div>
<div>
<CreateWorkflowForm />
</div>
</HeaderShell>
<div className='p-4'>
<Alert variant='info' className='text-start mb-2'>
<AlertTitle>What are flows?</AlertTitle>
<AlertDescription>
Flows are a sequence of actions that are executed when they meet certain conditions within the conversation with the copilots
</AlertDescription>
</Alert>
<WorkflowsTable />
</div>
</div>
)
}

0 comments on commit cbe3cfb

Please sign in to comment.