From 01f16a11d34222b2d8cf943b352cfc0f53c88056 Mon Sep 17 00:00:00 2001 From: akhisud3195 Date: Mon, 7 Apr 2025 16:42:03 +0530 Subject: [PATCH] Add feature flags for use multiple projects and display project page accordingly Update project new page style --- apps/rowboat/app/lib/feature_flags.ts | 8 +- .../projects/[projectId]/playground/app.tsx | 37 ++-- apps/rowboat/app/projects/select/app.tsx | 198 ++++++++++-------- .../select/components/submit-button.tsx | 2 +- 4 files changed, 143 insertions(+), 102 deletions(-) diff --git a/apps/rowboat/app/lib/feature_flags.ts b/apps/rowboat/app/lib/feature_flags.ts index 37c83deb..d388e9fa 100644 --- a/apps/rowboat/app/lib/feature_flags.ts +++ b/apps/rowboat/app/lib/feature_flags.ts @@ -2,4 +2,10 @@ export const USE_RAG = process.env.USE_RAG === 'true'; export const USE_RAG_UPLOADS = process.env.USE_RAG_UPLOADS === 'true'; export const USE_RAG_SCRAPING = process.env.USE_RAG_SCRAPING === 'true'; export const USE_CHAT_WIDGET = process.env.USE_CHAT_WIDGET === 'true'; -export const USE_AUTH = process.env.USE_AUTH === 'true'; \ No newline at end of file +export const USE_AUTH = process.env.USE_AUTH === 'true'; + +// export const USE_MULTIPLE_PROJECTS = true; +export const USE_MULTIPLE_PROJECTS = false; + +export const USE_TESTING_FEATURE = false; +export const USE_VOICE_FEATURE = false; \ No newline at end of file diff --git a/apps/rowboat/app/projects/[projectId]/playground/app.tsx b/apps/rowboat/app/projects/[projectId]/playground/app.tsx index 3eb62053..320e6029 100644 --- a/apps/rowboat/app/projects/[projectId]/playground/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/playground/app.tsx @@ -11,6 +11,7 @@ import { TestProfile } from "@/app/lib/types/testing_types"; import { WithStringId } from "@/app/lib/types/types"; import { ProfileSelector } from "@/app/projects/[projectId]/test/[[...slug]]/components/selectors/profile-selector"; import { CheckIcon, CopyIcon, PlusIcon, UserIcon } from "lucide-react"; +import { USE_TESTING_FEATURE } from "@/app/lib/feature_flags"; const defaultSystemMessage = ''; @@ -103,15 +104,17 @@ export function App({ } rightActions={
- + {USE_TESTING_FEATURE && ( + + )}