合并收口:恢复 master 的不可用模型列表渲染(冲突块取并集时漏了)
Project CI / Backend tests (pull_request) Failing after 14s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m14s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m5s
Project CI / Repository checks (pull_request) Failing after 25s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m40s
Project CI / Frontend tests (pull_request) Successful in 3m14s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m32s
Project CI / Native shell tests (pull_request) Successful in 8m44s

- 合并 master 76166b08c 时,`ConversationModelSelect` 的菜单渲染冲突块取了本分支的「强度区外壳」一侧,但 master 那侧**同时**包含不可用模型列表(`unavailableModels.map` + `Lock` 图标 + `unavailableModelReasonLabel`)→ 结果那三处变成未使用(eslint 三条 error)
- 修法:把 master 的不可用模型块(含注释)原样补回 `modelMenu` 变量里(`models.map` 之后、分隔线之前),外壳一侧不动;`Lock` / `unavailableModelReasonLabel` / `unavailableModels` 全部重新被使用
- 校验:eslint 该文件 0 error;typecheck pass 3 / fail 0;`conversationModelSelect + appSurface + chatDialogFrameLayout` 257 passed / 9 skipped
This commit is contained in:
2026-10-06 11:03:45 +08:00
parent 811efc102c
commit 0619b5e833
@@ -492,6 +492,28 @@ export function ConversationModelSelect({
) : null}
</button>
))}
{/* 目录里存在但当前档位不可用的模型:不可点;原因通过 aria-label 与 hover 提示暴露,
且刻意不进入 Tab 序列,避免键盘用户在不可选项上停留。 */}
{unavailableModels.map((model) => {
const reasonLabel = unavailableModelReasonLabel(model.reason);
return (
<div
key={model.id}
role="option"
aria-selected={false}
aria-disabled="true"
aria-label={`${model.displayName}:${reasonLabel}`}
className="conversation-model-menu-option conversation-model-menu-option-locked"
data-reason={model.reason}
data-tooltip={reasonLabel}
>
<span className="conversation-model-menu-option-main">
<span>{model.displayName}</span>
</span>
<Lock size={13} aria-hidden="true" />
</div>
);
})}
<div className="conversation-model-menu-divider" />
<button
type="button"