mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Safe navigation access for simple thinking options
This commit is contained in:
parent
38e3529c1e
commit
c8ce6ccbab
1 changed files with 4 additions and 4 deletions
|
|
@ -81,7 +81,7 @@ export const SimpleThinkingBudget = ({
|
|||
}
|
||||
// If persisted value isn't supported by capability (e.g., "minimal" while supports=true), don't show it
|
||||
const normalizedCurrent: ReasoningSelectValue | undefined =
|
||||
current && (availableOptions as readonly any[]).includes(current) ? current : undefined
|
||||
current && (availableOptions as readonly any[])?.includes(current) ? current : undefined
|
||||
|
||||
// Default when required: set to model default on mount (no synthetic "None")
|
||||
useEffect(() => {
|
||||
|
|
@ -109,9 +109,9 @@ export const SimpleThinkingBudget = ({
|
|||
<Select
|
||||
value={normalizedCurrent}
|
||||
onValueChange={(value: ReasoningSelectValue) => {
|
||||
if (value === "disable") {
|
||||
setApiConfigurationField("enableReasoningEffort", false, true)
|
||||
setApiConfigurationField("reasoningEffort", "disable" as any, true)
|
||||
if (value === "disable") {
|
||||
setApiConfigurationField("enableReasoningEffort", false, true)
|
||||
setApiConfigurationField("reasoningEffort", "disable" as any, true)
|
||||
} else {
|
||||
setApiConfigurationField("enableReasoningEffort", true, true)
|
||||
setApiConfigurationField("reasoningEffort", value as any, true)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue