Skip to content

Commit 83bf6a2

Browse files
committed
ship: iteration 2 — stabilize model picker recovery callback
1 parent 53c6133 commit 83bf6a2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/desktop/src/renderer/components/chat/AgentChatPane.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,9 @@ export function AgentChatPane({
30413041
const [pendingSteersBySession, setPendingSteersBySession] = useState<Record<string, PendingSteerEntry[]>>({});
30423042
const [modelId, setModelId] = useState<string>("");
30433043
const [modelPickerOpenRequestKey, setModelPickerOpenRequestKey] = useState<number | undefined>();
3044+
const handleModelPickerOpenRequestHandled = useCallback(() => {
3045+
setModelPickerOpenRequestKey(undefined);
3046+
}, []);
30443047
const [runtimeCatalogVersion, setRuntimeCatalogVersion] = useState(0);
30453048
const [reasoningEffort, setReasoningEffort] = useState<string | null>(null);
30463049
const [fastMode, setFastMode] = useState(false);
@@ -10231,7 +10234,7 @@ export function AgentChatPane({
1023110234
sdkSlashCommands={sdkSlashCommands}
1023210235
modelId={modelId}
1023310236
modelPickerOpenRequestKey={modelPickerOpenRequestKey}
10234-
onModelPickerOpenRequestHandled={() => setModelPickerOpenRequestKey(undefined)}
10237+
onModelPickerOpenRequestHandled={handleModelPickerOpenRequestHandled}
1023510238
availableModelIds={effectiveAvailableModelIds}
1023610239
constrainModelSelection={modelSelectionConstrained}
1023710240
modelUnavailableMessage={constrainedModelSelectionError ?? undefined}

0 commit comments

Comments
 (0)