diff --git a/src/pages/tenant/PromptExecutions.tsx b/src/pages/tenant/PromptExecutions.tsx index 8356a2c..a3b4941 100644 --- a/src/pages/tenant/PromptExecutions.tsx +++ b/src/pages/tenant/PromptExecutions.tsx @@ -8,8 +8,6 @@ import { Pagination, FilterDropdown, GradientStatCard, - PrimaryButton, - SecondaryButton, MarkdownViewer, } from "@/components/shared"; import { aiService } from "@/services/ai-service"; @@ -17,13 +15,10 @@ import type { AIPrompt, AICompletion } from "@/types/ai"; import { showToast } from "@/utils/toast"; import { formatDate } from "@/utils/format-date"; import { - Play, CheckCircle2, Clock, DollarSign, AlertTriangle, - ChevronRight, - ChevronDown, Terminal, MessageSquare, Sparkles, @@ -33,6 +28,7 @@ import { Activity } from "lucide-react"; import { cn } from "@/lib/utils"; +import CodeBadge from "@/components/shared/CodeBadge"; const PromptExecutions = (): ReactElement => { const { id } = useParams<{ id: string }>(); @@ -112,7 +108,9 @@ const PromptExecutions = (): ReactElement => { const promptVersion = metadata.prompt_version || "—"; return ( -
+ <> + + {/*
*/}
{/* Left Column: Metadata & Input Variables */}
@@ -240,37 +238,38 @@ const PromptExecutions = (): ReactElement => {
)}
-
+ {/*
*/} + ); }; const columns: Column[] = [ - { - key: "expand", - label: "", - width: "40px", - render: (row) => ( - - ), - }, + // { + // key: "expand", + // label: "", + // width: "40px", + // render: (row) => ( + // + // ), + // }, { key: "date", label: "Date", render: (row) => ( - + {formatDate(row.created_at || "")} ), @@ -279,16 +278,14 @@ const PromptExecutions = (): ReactElement => { key: "provider", label: "Provider", render: (row) => ( - - {row.provider} - + ), }, { key: "model", label: "Model", render: (row) => ( - + {row.model} ), @@ -297,7 +294,7 @@ const PromptExecutions = (): ReactElement => { key: "latency", label: "Latency", render: (row) => ( - + {row.latency_ms ? `${row.latency_ms}ms` : "—"} ), @@ -306,7 +303,7 @@ const PromptExecutions = (): ReactElement => { key: "cost", label: "Cost", render: (row) => ( - + {row.cost ? `USD ${row.cost.toFixed(5)}` : "—"} ), @@ -359,17 +356,17 @@ const PromptExecutions = (): ReactElement => { ), description: `Track execution metrics, variables, and failure traces for prompt "${prompt?.name}".`, - action: ( -
- navigate("/tenant/ai/prompts")}> - Back to Prompts - - navigate(`/tenant/ai/prompts/${id}/execute`)}> - - Execute Prompt - -
- ), + // action: ( + //
+ // navigate("/tenant/ai/prompts")}> + // Back to Prompts + // + // navigate(`/tenant/ai/prompts/${id}/execute`)}> + // + // Execute Prompt + // + //
+ // ), }} >
@@ -402,10 +399,10 @@ const PromptExecutions = (): ReactElement => {
{/* FILTER AND DATA TABLE */} -
+
{/* FILTERS BAR */} -
+
{
{/* DATA TABLE */} -
+
{ /> {pagination.total > 0 && ( -
+ //
{ { value: "20", label: "20 per page" }, ]} /> -
+ //
)}