diff --git a/src/index.css b/src/index.css index c8c4bf9..5256a93 100644 --- a/src/index.css +++ b/src/index.css @@ -2121,3 +2121,23 @@ select.studio-input { background: var(--bp-paper); } .docs-split { grid-template-columns: 1fr; } .docs-rows { max-height: 50vh; } } + +.approvals-runtime-note { + padding: 10px 12px; + background: color-mix(in srgb, var(--bp-amber) 14%, var(--bp-paper)); + border: 1px solid color-mix(in srgb, var(--bp-amber) 40%, var(--bp-navy)); + font-size: 12px; + line-height: 1.4; + color: var(--bp-navy); +} + +.agent-llm-state { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; } +.agent-llm-pill { + display: inline-block; padding: 2px 8px; + font-family: var(--bp-mono); font-size: 10px; letter-spacing: 0.06em; + border: 1px solid var(--bp-navy); align-self: flex-start; +} +.agent-llm-on { background: color-mix(in srgb, #2e7a25 35%, var(--bp-paper)); color: var(--bp-paper); } +.agent-llm-off { color: var(--bp-muted); } +.agent-llm-unknown { color: var(--bp-muted); } +.agent-llm-hint { font-size: 11px; color: var(--bp-muted); line-height: 1.4; } diff --git a/src/scenes/Agent.tsx b/src/scenes/Agent.tsx index d3ef3af..af36bcd 100644 --- a/src/scenes/Agent.tsx +++ b/src/scenes/Agent.tsx @@ -33,8 +33,21 @@ export default function Agent() { ]); const [draft, setDraft] = useState(""); const [working, setWorking] = useState(false); + const [llmState, setLlmState] = useState<"unknown" | "ready" | "off">("unknown"); const scrollRef = useRef(null); + useEffect(() => { + let cancelled = false; + fetch("/internal/canvas-llm/chat", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ messages: [{ role: "user", content: "probe" }], max_tokens: 1 }), + }) + .then((r) => { if (!cancelled) setLlmState(r.status === 503 ? "off" : r.ok ? "ready" : "off"); }) + .catch(() => { if (!cancelled) setLlmState("off"); }); + return () => { cancelled = true; }; + }, []); + useEffect(() => { setTimeout(() => scrollRef.current?.scrollTo({ top: scrollRef.current.scrollHeight, behavior: "smooth" }), 50); }, [turns]); @@ -65,7 +78,11 @@ export default function Agent() {
FlowMaster Command Assistant

Tell the cockpit what to do

-

Deterministic command router with EA2-backed text memory. The LLM adapter ships separately when a provider key is configured.

+

Deterministic command router with EA2-backed text memory.

+
+ LLM provider · {llmState === "ready" ? "ON" : llmState === "off" ? "OFF" : "…"} + {llmState === "off" && Set OPENAI_API_KEY or ANTHROPIC_API_KEY to enable natural language replies.} +
CAPABILITIES
diff --git a/src/scenes/Approvals.tsx b/src/scenes/Approvals.tsx index 48004b2..ce6ccf5 100644 --- a/src/scenes/Approvals.tsx +++ b/src/scenes/Approvals.tsx @@ -163,6 +163,9 @@ export default function Approvals() {
)} +
+ Acting on a step writes the decision back to EA2. The runtime-values service in this environment is currently offline, so a Submit will be rejected with an error. Use this view to inspect cases; switch to a live environment to act on them. +
{(tx.available_actions || []).map((a: any) => ( ))} {(!tx.available_actions || tx.available_actions.length === 0) && (