fix: distinguish image connection and generation checks
This commit is contained in:
@@ -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="会消耗一次模型调用额度">
|
||||
|
||||
Reference in New Issue
Block a user