This repository has been archived by the owner on Jan 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow page with flow renderer
- Loading branch information
Showing
2 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
dashboard/app/(copilot)/copilot/[copilot_id]/workflow/[workflow_id]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
36
dashboard/app/(copilot)/copilot/[copilot_id]/workflow/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
) | ||
} |