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 ? (
{tools.map((t, idx) => (
{t.name}
{t.description &&
{t.description}
}
))}
) : (
This provider exposes no tools, so the agent cannot use it.