mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-29 02:24:02 +02:00
* moved settings to a modal inside the build view under deployment * project name is a editable field in the build view * project name is propogated correctly * remove project name from settings modal * split settings into phone and api * added chat widget option to the deploy settings * bring back top level settings tab with few options * removed cancel option from twilio settings
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import { Metadata } from "next";
|
|
import { App } from "./app";
|
|
import { USE_RAG, USE_RAG_UPLOADS, USE_RAG_S3_UPLOADS, USE_RAG_SCRAPING } from "@/app/lib/feature_flags";
|
|
import { projectsCollection } from "@/app/lib/mongodb";
|
|
import { notFound } from "next/navigation";
|
|
import { requireActiveBillingSubscription } from '@/app/lib/billing';
|
|
import { migrate_versioned_workflows } from "@/app/lib/migrate_versioned_workflows";
|
|
|
|
const DEFAULT_MODEL = process.env.PROVIDER_DEFAULT_MODEL || "gpt-4.1";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Workflow"
|
|
}
|
|
|
|
export default async function Page(
|
|
props: {
|
|
params: Promise<{ projectId: string }>;
|
|
}
|
|
) {
|
|
const params = await props.params;
|
|
await requireActiveBillingSubscription();
|
|
console.log('->>> workflow page being rendered');
|
|
const project = await projectsCollection.findOne({
|
|
_id: params.projectId,
|
|
});
|
|
if (!project) {
|
|
notFound();
|
|
}
|
|
|
|
// migrate versioned workflows for this project
|
|
if (!project.draftWorkflow) {
|
|
await migrate_versioned_workflows(params.projectId);
|
|
}
|
|
|
|
console.log('/workflow page.tsx serve');
|
|
|
|
return (
|
|
<App
|
|
projectId={params.projectId}
|
|
useRag={USE_RAG}
|
|
useRagUploads={USE_RAG_UPLOADS}
|
|
useRagS3Uploads={USE_RAG_S3_UPLOADS}
|
|
useRagScraping={USE_RAG_SCRAPING}
|
|
defaultModel={DEFAULT_MODEL}
|
|
chatWidgetHost={process.env.CHAT_WIDGET_HOST || ''}
|
|
/>
|
|
);
|
|
}
|