"use client"; import { Layers, AlertCircle } from "lucide-react"; import { Card, CardContent } from "@/components/ui/card"; import { Skeleton } from "@/components/ui/skeleton"; import { Badge } from "@/components/ui/badge"; import { useMcpBlocks, type McpBlock } from "@/lib/api/settings"; const GEN_TYPE_LABEL: Record = { "template-fill": "מילוי תבנית", "paraphrase": "פרפרזה", "reproduction": "שעתוק", "guided-synthesis": "סינתזה מודרכת", "rhetorical-construction": "בניה רטורית", }; const GEN_TYPE_TONE: Record = { "template-fill": "text-ink-muted border-rule", "paraphrase": "text-info border-info/40", "reproduction": "text-info border-info/40", "guided-synthesis": "text-warn border-warn/40", "rhetorical-construction": "text-gold-deep border-gold/40", }; function BlockRow({ block }: { block: McpBlock }) { const isLLM = block.model !== "script"; return (
{block.index}

{block.title}

{block.id}
{GEN_TYPE_LABEL[block.gen_type] ?? block.gen_type} {block.model} {isLLM && block.temperature !== null && ( temp {block.temperature} )} {block.max_tokens !== null && ( max {block.max_tokens} )}
{(block.creac_role || block.jwm_purpose) && (
{block.creac_role && (
CREAC: {block.creac_role}
)} {block.jwm_purpose && (
JWM: {block.jwm_purpose}
)}
)}
); } export function BlocksTab() { const { data, isPending, error } = useMcpBlocks(); if (isPending) return ; if (error) { return ( שגיאה בטעינת בלוקים: {error.message} ); } if (!data) return null; return (
ארכיטקטורת 12 הבלוקים של החלטת ועדת ערר. מקור הסכימה:{" "} docs/block-schema.md .
{data.blocks.map((b) => ( ))}
); }