From c8ce6ccbab04f3d43644b6927b959ffacc77bca4 Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Thu, 13 Nov 2025 22:45:17 -0500 Subject: [PATCH] Safe navigation access for simple thinking options --- .../src/components/settings/SimpleThinkingBudget.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webview-ui/src/components/settings/SimpleThinkingBudget.tsx b/webview-ui/src/components/settings/SimpleThinkingBudget.tsx index 973ba1e9c6..f3d1d8f6bf 100644 --- a/webview-ui/src/components/settings/SimpleThinkingBudget.tsx +++ b/webview-ui/src/components/settings/SimpleThinkingBudget.tsx @@ -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 = ({