fix: enable Apply button when models are selected

Fix button state condition - check selectedModels.length instead of selectedModel.

Co-authored-by: raccoonwannafly <130273473+raccoonwannafly@users.noreply.github.com>
Made-with: Cursor
This commit is contained in:
raccoonwannafly 2026-04-10 10:27:21 +07:00 committed by decolua
parent 1a25c6e3b5
commit f8a267746a

View file

@ -409,7 +409,7 @@ export default function OpenCodeToolCard({ tool, isExpanded, onToggle, baseUrl,
)}
<div className="flex items-center gap-2">
<Button variant="primary" size="sm" onClick={handleApply} disabled={selectedModels.length === 0 || !selectedModel} loading={applying}>
<Button variant="primary" size="sm" onClick={handleApply} disabled={selectedModels.length === 0} loading={applying}>
<span className="material-symbols-outlined text-[14px] mr-1">save</span>Apply
</Button>
<Button variant="outline" size="sm" onClick={handleReset} disabled={!status.has9Router} loading={restoring}>