mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-19 18:35:18 +02:00
Remove transfer control after turn option
This commit is contained in:
parent
882a33aa6f
commit
affbc25583
2 changed files with 30 additions and 19 deletions
|
|
@ -5,6 +5,7 @@ export const USE_CHAT_WIDGET = process.env.USE_CHAT_WIDGET === 'true';
|
||||||
export const USE_AUTH = process.env.USE_AUTH === 'true';
|
export const USE_AUTH = process.env.USE_AUTH === 'true';
|
||||||
|
|
||||||
// Hardcoded flags
|
// Hardcoded flags
|
||||||
export const USE_MULTIPLE_PROJECTS = true;
|
export const USE_MULTIPLE_PROJECTS = false;
|
||||||
export const USE_TESTING_FEATURE = false;
|
export const USE_TESTING_FEATURE = false;
|
||||||
export const USE_VOICE_FEATURE = false;
|
export const USE_VOICE_FEATURE = false;
|
||||||
|
export const USE_TRANSFER_CONTROL_OPTIONS = false;
|
||||||
|
|
@ -19,6 +19,7 @@ import { Panel } from "@/components/common/panel-common";
|
||||||
import { Button as CustomButton } from "@/components/ui/button";
|
import { Button as CustomButton } from "@/components/ui/button";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import { EditableField } from "@/app/lib/components/editable-field";
|
import { EditableField } from "@/app/lib/components/editable-field";
|
||||||
|
import { USE_TRANSFER_CONTROL_OPTIONS } from "@/app/lib/feature_flags";
|
||||||
|
|
||||||
// Common section header styles
|
// Common section header styles
|
||||||
const sectionHeaderStyles = "text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400";
|
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);
|
setLocalName(agent.name);
|
||||||
}, [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) => {
|
const validateName = (value: string) => {
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
setNameError("Name cannot be empty");
|
setNameError("Name cannot be empty");
|
||||||
|
|
@ -414,6 +422,7 @@ export function AgentConfig({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{USE_TRANSFER_CONTROL_OPTIONS && (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<label className={sectionHeaderStyles}>
|
<label className={sectionHeaderStyles}>
|
||||||
Conversation control after turn
|
Conversation control after turn
|
||||||
|
|
@ -431,6 +440,7 @@ export function AgentConfig({
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<PreviewModalProvider>
|
<PreviewModalProvider>
|
||||||
<GenerateInstructionsModal
|
<GenerateInstructionsModal
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue