mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-25 18:55:19 +02:00
Conditionally render test profiles in playground based on use testing flag
This commit is contained in:
parent
01f16a11d3
commit
f7a4afe49d
2 changed files with 15 additions and 14 deletions
|
|
@ -131,15 +131,13 @@ export function App({
|
|||
</div>
|
||||
}
|
||||
>
|
||||
{USE_TESTING_FEATURE && (
|
||||
<ProfileSelector
|
||||
projectId={projectId}
|
||||
isOpen={isProfileSelectorOpen}
|
||||
onOpenChange={setIsProfileSelectorOpen}
|
||||
onSelect={handleTestProfileChange}
|
||||
selectedProfileId={testProfile?._id}
|
||||
/>
|
||||
)}
|
||||
<ProfileSelector
|
||||
projectId={projectId}
|
||||
isOpen={isProfileSelectorOpen}
|
||||
onOpenChange={setIsProfileSelectorOpen}
|
||||
onSelect={handleTestProfileChange}
|
||||
selectedProfileId={testProfile?._id}
|
||||
/>
|
||||
<div className="h-full overflow-auto px-4 py-4">
|
||||
<Chat
|
||||
key={`chat-${counter}`}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import { apiV1 } from "rowboat-shared";
|
|||
import { TestProfile } from "@/app/lib/types/testing_types";
|
||||
import { WithStringId } from "@/app/lib/types/types";
|
||||
import { ProfileContextBox } from "./profile-context-box";
|
||||
import { USE_TESTING_FEATURE } from "@/app/lib/feature_flags";
|
||||
|
||||
export function Chat({
|
||||
chat,
|
||||
|
|
@ -225,11 +226,13 @@ export function Chat({
|
|||
|
||||
return <div className="relative max-w-3xl mx-auto h-full flex flex-col">
|
||||
<div className="sticky top-0 z-10 bg-white dark:bg-zinc-900 pt-4 pb-4">
|
||||
<ProfileContextBox
|
||||
content={testProfile?.context || systemMessage || ''}
|
||||
onChange={onSystemMessageChange}
|
||||
locked={testProfile !== null}
|
||||
/>
|
||||
{USE_TESTING_FEATURE && (
|
||||
<ProfileContextBox
|
||||
content={testProfile?.context || systemMessage || ''}
|
||||
onChange={onSystemMessageChange}
|
||||
locked={testProfile !== null}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex-1 overflow-auto pr-1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue