import { h } from "preact"; import { useState, useEffect } from "preact/hooks"; import "./memory.css"; import { api } from "../base/api.jsx"; import { Pill } from "../base/pill.jsx"; function Empty({ title, detail }) { return (
{title}
{detail &&
{detail}
}
); } function roleLabel(role) { return role === "external" ? "Added by you — an external store Archie was given" : "Built in — always available to Archie"; } function ProviderCard({ provider: p }) { const tools = p.tools || []; return (

{p.name || "provider"}

{roleLabel(p.role)}

{p.available ? : }
{!p.available && (

Configured but not usable right now — a required binary or connection may be missing.

)} {tools.length ? ( ) : (

This provider exposes no tools, so the agent cannot use it.

)}
); } function MemoryApp() { const [providers, setProviders] = useState(null); const [enabled, setEnabled] = useState(true); const [error, setError] = useState(null); const [loading, setLoading] = useState(true); const load = async () => { setLoading(true); setError(null); try { const res = await api.memory(); setEnabled(!!res.enabled); setProviders(res.providers || []); } catch (err) { setError(String(err.message || err)); } finally { setLoading(false); } }; useEffect(() => { load(); }, []); return (

Memory

What Archie can recall between conversations, and the tools it uses to do it.

{loading ? (
Loading…
) : error ? (
) : !enabled || !providers.length ? (
) : (
{providers.map((p, idx) => ( ))}
)}
); } export function memoryPage(query) { return ; }