mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-06-06 19:35:44 +02:00
Fix test profile implementation
This commit is contained in:
parent
4bd72ba245
commit
645d0c27f9
18 changed files with 128 additions and 190 deletions
|
|
@ -24,16 +24,14 @@ export function App({
|
|||
projectId,
|
||||
workflow,
|
||||
messageSubscriber,
|
||||
initialTestProfile,
|
||||
}: {
|
||||
hidden?: boolean;
|
||||
projectId: string;
|
||||
workflow: z.infer<typeof Workflow>;
|
||||
messageSubscriber?: (messages: z.infer<typeof apiV1.ChatMessage>[]) => void;
|
||||
initialTestProfile: z.infer<typeof TestProfile>;
|
||||
}) {
|
||||
const [counter, setCounter] = useState<number>(0);
|
||||
const [testProfile, setTestProfile] = useState<z.infer<typeof TestProfile>>(initialTestProfile);
|
||||
const [testProfile, setTestProfile] = useState<z.infer<typeof TestProfile> | null>(null);
|
||||
const [chat, setChat] = useState<z.infer<typeof PlaygroundChat>>({
|
||||
projectId,
|
||||
createdAt: new Date().toISOString(),
|
||||
|
|
@ -42,7 +40,7 @@ export function App({
|
|||
systemMessage: defaultSystemMessage,
|
||||
});
|
||||
|
||||
function handleTestProfileChange(profile: WithStringId<z.infer<typeof TestProfile>>) {
|
||||
function handleTestProfileChange(profile: WithStringId<z.infer<typeof TestProfile>> | null) {
|
||||
setTestProfile(profile);
|
||||
setCounter(counter + 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue