fix(ui): preserve default in thinking cycle (#3153)
This commit is contained in:
@@ -273,16 +273,16 @@ export const useKeyboardShortcuts = () => {
|
||||
if (state.isSettingsDialogOpen || hasOverlay) return false;
|
||||
const config = useConfigStore.getState();
|
||||
if (config.getCurrentModelVariants().length === 0) return false;
|
||||
config.cycleCurrentVariant();
|
||||
const nextVariantOverride = config.cycleCurrentVariant();
|
||||
const sessionId = useSessionUIStore.getState().currentSessionId;
|
||||
const { currentVariant, currentAgentName, currentProviderId, currentModelId } = useConfigStore.getState();
|
||||
const { currentAgentName, currentProviderId, currentModelId } = useConfigStore.getState();
|
||||
if (sessionId && currentAgentName && currentProviderId && currentModelId) {
|
||||
useSelectionStore.getState().saveAgentModelVariantForSession(
|
||||
sessionId,
|
||||
currentAgentName,
|
||||
currentProviderId,
|
||||
currentModelId,
|
||||
currentVariant,
|
||||
nextVariantOverride,
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -71,10 +71,9 @@ export const useMiniChatKeyboardShortcuts = () => {
|
||||
const configState = useConfigStore.getState();
|
||||
if (configState.getCurrentModelVariants().length === 0) return false;
|
||||
|
||||
configState.cycleCurrentVariant();
|
||||
const nextVariantOverride = configState.cycleCurrentVariant();
|
||||
const sessionId = useSessionUIStore.getState().currentSessionId;
|
||||
const {
|
||||
currentVariant,
|
||||
currentAgentName,
|
||||
currentProviderId,
|
||||
currentModelId,
|
||||
@@ -85,7 +84,7 @@ export const useMiniChatKeyboardShortcuts = () => {
|
||||
currentAgentName,
|
||||
currentProviderId,
|
||||
currentModelId,
|
||||
currentVariant,
|
||||
nextVariantOverride,
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user