diff --git a/app/(protected)/project/[project_id]/prompts/[prompt_id]/page.tsx b/app/(protected)/project/[project_id]/prompts/[prompt_id]/page.tsx index 99a5cc95..167d8831 100644 --- a/app/(protected)/project/[project_id]/prompts/[prompt_id]/page.tsx +++ b/app/(protected)/project/[project_id]/prompts/[prompt_id]/page.tsx @@ -20,6 +20,7 @@ export default function Page() { const router = useRouter(); const [prompts, setPrompts] = useState([]); const [selectedPrompt, setSelectedPrompt] = useState(); + const [createDialogOpen, setCreateDialogOpen] = useState(false); const [live, setLive] = useState(false); const queryClient = useQueryClient(); @@ -72,6 +73,8 @@ export default function Page() { @@ -93,11 +96,15 @@ export default function Page() { currentPrompt={selectedPrompt} promptsetId={promptsetId} version={prompts.length + 1} + open={createDialogOpen} + setOpen={setCreateDialogOpen} /> ) : ( )} @@ -247,7 +254,6 @@ function PageLoading() { Back -
diff --git a/components/evaluate/evaluation-table.tsx b/components/evaluate/evaluation-table.tsx index 9f86b601..46af7b3f 100644 --- a/components/evaluate/evaluation-table.tsx +++ b/components/evaluate/evaluation-table.tsx @@ -164,17 +164,21 @@ export default function EvaluationTable({ !currentData ? ( ) : ( - currentData.map((span: any, i: number) => ( - - )) + currentData.map((span: any, i: number) => { + if (span.status_code !== "ERROR") { + return ( + + ); + } + }) )} {showLoader && (
diff --git a/components/playground/common.tsx b/components/playground/common.tsx index e68fef71..6d31b5f8 100644 --- a/components/playground/common.tsx +++ b/components/playground/common.tsx @@ -1,3 +1,6 @@ +"use client"; + +import PromptRegistryDialog from "@/components/playground/prompt-registry-dialog"; import LLMPicker from "@/components/shared/llm-picker"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; @@ -9,6 +12,8 @@ import { import { cn } from "@/lib/utils"; import { MinusCircleIcon, PlusIcon } from "lucide-react"; import { useEffect, useRef, useState } from "react"; +import { useQuery } from "react-query"; +import { toast } from "sonner"; export function RoleBadge({ role, @@ -34,15 +39,24 @@ export function ExpandingTextArea({ value, onChange, setFocusing, + saveButtonRef, + handleSave, }: { value: string; onChange: any; setFocusing?: any; + saveButtonRef: React.RefObject; + handleSave: (open: boolean) => void; }) { const textAreaRef = useRef(null); const handleClickOutside = (event: any) => { - if (textAreaRef.current && !textAreaRef.current.contains(event.target)) { + if ( + textAreaRef.current && + !textAreaRef.current.contains(event.target) && + saveButtonRef.current && + !saveButtonRef.current.contains(event.target) + ) { setFocusing(false); } }; @@ -63,13 +77,25 @@ export function ExpandingTextArea({ }; return ( -