fix(web): agent check default model fallback; ensure browser session before desktop iframe (FIX-5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6aaf8c0704
commit
9244315768
4 files changed
+63
-22
No files matched your search
@@ -31,7 +31,12 @@ const plainSummary = (t: string) =>
|
||||
const capTitle = (id: string) => CAPABILITY_CATALOG[id as KnownCapabilityId]?.title ?? id;
|
||||
|
||||
/** 默认上游(巡检没有单独的上游设置,跟随 Agent 设置里的默认上游) */
|
||||
export type DefaultUpstream = { name: string; model: string | null } | null;
|
||||
export type DefaultUpstream = {
|
||||
name: string;
|
||||
/** 上游的默认模型;上游没填时是模型目录的第一个(modelFromCatalog) */
|
||||
model: string | null;
|
||||
modelFromCatalog?: boolean;
|
||||
} | null;
|
||||
|
||||
const modelsTitle = (models: { provider: string | null; model: string; count: number }[]) =>
|
||||
models.map((m) => `${m.provider ? `${m.provider} · ` : ""}${m.model}:${m.count} 次`).join("\n");
|
||||
@@ -152,9 +157,16 @@ export function AgentCheckCard({
|
||||
) : null}
|
||||
</span>
|
||||
) : upstream ? (
|
||||
<span className="break-words">
|
||||
默认上游 {upstream.name}
|
||||
{upstream.model ? ` · ${upstream.model}` : ""}
|
||||
<span
|
||||
className="break-words"
|
||||
title={
|
||||
upstream.modelFromCatalog
|
||||
? "上游没有指定默认模型,运行时使用模型目录里的第一个"
|
||||
: "还没有运行记录,按默认上游显示"
|
||||
}
|
||||
>
|
||||
默认上游 {upstream.name} · {upstream.model ?? "模型未指定"}
|
||||
{upstream.modelFromCatalog ? <span className="text-muted-foreground">(目录首个)</span> : null}
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-muted-foreground">未配置 Agent 上游</span>
|
||||
|
||||
Reference in new issue
Block a user