From 80e35d728b6f2731df6573fc9286fad76bf19788 Mon Sep 17 00:00:00 2001 From: Parker Stafford Date: Tue, 8 Oct 2024 15:11:12 -0700 Subject: [PATCH] update prop type to be InitialPlaygroundState --- app/src/pages/playground/Playground.tsx | 4 ++-- app/src/store/playgroundStore.tsx | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/pages/playground/Playground.tsx b/app/src/pages/playground/Playground.tsx index 2def7da0f23..8dd2d6a3757 100644 --- a/app/src/pages/playground/Playground.tsx +++ b/app/src/pages/playground/Playground.tsx @@ -8,12 +8,12 @@ import { PlaygroundProvider, usePlaygroundContext, } from "@phoenix/contexts/PlaygroundContext"; -import { PlaygroundProps } from "@phoenix/store"; +import { InitialPlaygroundState } from "@phoenix/store"; import { PlaygroundInstance } from "./PlaygroundInstance"; import { PlaygroundOperationTypeRadioGroup } from "./PlaygroundOperationTypeRadioGroup"; -export function Playground(props: Partial) { +export function Playground(props: InitialPlaygroundState) { return ( ; } +export type InitialPlaygroundState = Partial; + type DatasetInput = { datasetId: string; }; @@ -192,7 +194,7 @@ const DEFAULT_TEXT_COMPLETION_TEMPLATE: PlaygroundTextCompletionTemplate = { }; export const createPlaygroundStore = ( - initialProps?: Partial + initialProps?: InitialPlaygroundState ) => { const playgroundStore: StateCreator = (set, get) => ({ operationType: "chat",