diff --git a/apps/rowboat/app/lib/feature_flags.ts b/apps/rowboat/app/lib/feature_flags.ts index caf95116..346b1c75 100644 --- a/apps/rowboat/app/lib/feature_flags.ts +++ b/apps/rowboat/app/lib/feature_flags.ts @@ -5,6 +5,7 @@ export const USE_CHAT_WIDGET = process.env.USE_CHAT_WIDGET === 'true'; export const USE_AUTH = process.env.USE_AUTH === 'true'; // Hardcoded flags -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 +export const USE_VOICE_FEATURE = false; +export const USE_TRANSFER_CONTROL_OPTIONS = false; \ No newline at end of file diff --git a/apps/rowboat/app/projects/[projectId]/entities/agent_config.tsx b/apps/rowboat/app/projects/[projectId]/entities/agent_config.tsx index b301c02e..7b534fc0 100644 --- a/apps/rowboat/app/projects/[projectId]/entities/agent_config.tsx +++ b/apps/rowboat/app/projects/[projectId]/entities/agent_config.tsx @@ -19,6 +19,7 @@ import { Panel } from "@/components/common/panel-common"; import { Button as CustomButton } from "@/components/ui/button"; import clsx from "clsx"; import { EditableField } from "@/app/lib/components/editable-field"; +import { USE_TRANSFER_CONTROL_OPTIONS } from "@/app/lib/feature_flags"; // Common section header styles const sectionHeaderStyles = "text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400"; @@ -61,6 +62,13 @@ export function AgentConfig({ setLocalName(agent.name); }, [agent.name]); + // Add effect to handle control type update when transfer control is disabled + useEffect(() => { + if (!USE_TRANSFER_CONTROL_OPTIONS && agent.controlType !== 'retain') { + handleUpdate({ ...agent, controlType: 'retain' }); + } + }, [USE_TRANSFER_CONTROL_OPTIONS, agent.controlType, agent, handleUpdate]); + const validateName = (value: string) => { if (value.length === 0) { setNameError("Name cannot be empty"); @@ -414,23 +422,25 @@ export function AgentConfig({ /> -