// debug-panel.jsx — floating developer panel shared across all variants. // Surfaces: recent turns, source tracking, backend, latency, and the // full keyword-lookup table. function DebugPanel({ debug, onClose, palette, font }) { const [tab, setTab] = React.useState("turns"); return (
fetch good boi / debug
{[ { id: "turns", label: "turns" }, { id: "keywords", label: "keywords" }, { id: "about", label: "about" }, ].map(t => ( ))}
{tab === "turns" && } {tab === "keywords" && } {tab === "about" && }
); } function DebugLog({ debug, palette }) { if (debug.length === 0) { return (
No turns yet. Ask Fetch something.
); } return (
{debug.map((d, i) => (
{new Date(d.t).toLocaleTimeString()} {d.backend} · {d.ms}ms
user> {d.user}
fetch> {d.reply}
{"source: "} {d.source === "fact" ? `fact · ${d.fact?.keyword}` : d.source || "unknown"}
))}
); } function DebugKB({ palette }) { return (
{FETCH_KNOWLEDGE_BASE.length} keywords · first match wins
{FETCH_KNOWLEDGE_BASE.map(([k, v]) => (
{k}
{v}
))}
); } function DebugAbout({ palette }) { return (
Fetch Good Boi is a dog-loving chatbot backed by BlenderBot-400M-distill running on CPU.
Responses use a keyword lookup layer — if a fact matches the query, it's prepended to the prompt. BlenderBot then generates a reply within a four-turn context window. Fallbacks cover anything the model returns too short or empty. If the backend fails, the browser falls back to keyword lookup automatically.
The demo version runs separately as a static Space.
Fetch Good Boi runs on CPU, so responses may take a few seconds.
Designed with Claude Design · Built with Claude Code
); } Object.assign(window, { DebugPanel });