{#if $settingsQuery.isLoading}

正在读取模型…

{:else if !$settingsQuery.data}{:else}{@const s = $settingsQuery.data}{@const profiles = s.llm_profiles}{@const activeId = s.llm_active_id}
{#each profiles as profile (profile.id)}{@const rec = tests[profile.id]}
{profile.name}{rec?.ms != null ? Math.round(rec.ms) + "ms" : "—"}
{profile.base_url}
{profile.model}
{rec?.ok === false ? (rec.reason ?? "连接失败") : rec?.ok ? "连接测试通过" : "尚未测试"}
{agentsUsing(s, profile.id)} 个智能体使用
{/each}

{t("models.agentsTitle")}

{t("models.agentsHint")}
{#each AGENTS as agent (agent.role)} {/each}
{/if} $deleteMutation.mutate()} oncancel={() => (deleteTarget = null)} />