Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
import type { PluginDetailModel } from "./pluginDetailModel";
/** Status belongs to the smallest surface it blocks; independent scopes can coexist. */
export function pluginDetailNotices(model: PluginDetailModel) {
const fresh = !["offline", "loadFailed", "loading"].includes(
model.status ?? "",
);
const top = ["offline", "loadFailed", "retired", "approvalRequired"].includes(
model.status ?? "",
)
? model.status === "approvalRequired" && model.builtin
? "builtinRecovery"
: model.status
: fresh && model.runtimeIssue === "fused"
? "fused"
: undefined;
return { top, loading: model.status === "loading" };
}