feat(frontend): CentralStatus + ModelActivityPanel components

This commit is contained in:
2026-06-29 21:42:46 +02:00
parent 068c6f197d
commit b391101a5d
4 changed files with 96 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
import { useSessionStore } from "../store/sessionStore";
/** The minimal central view: the user's last input/choice + the gate's curated
* messages for the current step. The verbose model stream lives in the left panel. */
export function CentralStatus() {
const lastUserEntry = useSessionStore((s) => s.lastUserEntry);
const stepMessages = useSessionStore((s) => s.stepMessages);
if (!lastUserEntry && stepMessages.length === 0) return null;
return (
<div className="flex flex-col gap-3">
{lastUserEntry && (
<div className="rounded-lg border border-border/70 bg-card px-3 py-2">
<span className="text-[0.65rem] font-semibold uppercase tracking-wide text-muted-foreground">
{lastUserEntry.kind === "input" ? "You asked" : "You chose"}
</span>
<p className="mt-0.5 text-sm text-foreground">{lastUserEntry.text}</p>
</div>
)}
{stepMessages.map((m, i) => (
<p
key={i}
className={[
"text-sm",
m.level === "error" ? "text-destructive"
: m.level === "warning" ? "text-amber-600"
: "text-foreground/90",
].join(" ")}
>
{m.text}
</p>
))}
</div>
);
}