fix: distinguish image connection and generation checks

This commit is contained in:
Codex
2026-08-01 23:55:56 +08:00
parent 52d877836c
commit 922f8f4f2a
5 changed files with 134 additions and 18 deletions
+3 -2
View File
@@ -249,6 +249,7 @@ export function SettingsCenter({ open, onClose, onReadinessChange }: SettingsCen
});
const result = await response.json() as TestResult;
setTestResults((current) => ({ ...current, [target]: result }));
await loadSettings();
setNotice({ tone: result.ok ? "success" : "error", text: result.message });
} catch (error) {
setNotice({ tone: "error", text: getErrorMessage(error) });
@@ -568,7 +569,7 @@ function ModelPoolPanel({ draft, tests, busy, onChange, onTest, onTrial }: Model
<div className="model-editor-heading">
<div>
<h3>{pool.some((item) => item.id === editor.id) ? "编辑模型" : "添加模型"}</h3>
<p> ID </p>
<p></p>
</div>
<button className="icon-button small" type="button" onClick={() => setEditor(null)} aria-label="关闭模型编辑器">
<XIcon size={16} />
@@ -815,7 +816,7 @@ function ModelGroup({ title, description, category, models, tests, busy, onAdd,
<div className="model-row-actions">
<button className="button button-secondary compact" type="button" onClick={() => onTest(model.id)} disabled={Boolean(busy) || !model.enabled}>
{busy === target ? <ArrowClockwiseIcon className="spin" size={14} /> : <PlugIcon size={14} />}
</button>
{model.capabilities.includes("image_generation") ? (
<button className="button button-secondary compact" type="button" onClick={() => onTrial(model.id)} disabled={Boolean(busy) || !model.enabled} title="会消耗一次模型调用额度">