Revert "fix(ui): stop pinning inherited effort as a session choice on send"

This reverts commit 0a47b306d6.
This commit is contained in:
Iuliia Ivashko
2026-09-04 14:12:56 +03:00
parent 0b803468a3
commit 3cd31a090a
2 changed files with 1 additions and 110 deletions
+1 -15
View File
@@ -1713,21 +1713,7 @@ export const useSessionUIStore = create<SessionUIState>()((set, get) => ({
if (targetSessionId && effectiveAgent) {
useSelectionStore.getState().saveSessionAgentSelection(targetSessionId, effectiveAgent)
useSelectionStore.getState().saveAgentModelForSession(targetSessionId, effectiveAgent, providerID, modelID)
// `variant` is the effective effort, inherited defaults included.
// Recording it verbatim would pin the inherited default as this
// session's explicit choice, so the picker jumps from "Default" to
// that effort after the send. When the send reflects the live picker
// selection, record only an explicit override; sends carrying a
// captured configuration for another context keep their variant.
const configState = useConfigStore.getState()
const reflectsLiveSelection = targetSessionId === get().currentSessionId
&& configState.currentProviderId === providerID
&& configState.currentModelId === modelID
&& configState.currentAgentName === effectiveAgent
const variantToRecord = reflectsLiveSelection
? configState.currentVariantSelection.override ?? undefined
: variant
useSelectionStore.getState().saveAgentModelVariantForSession(targetSessionId, effectiveAgent, providerID, modelID, variantToRecord)
useSelectionStore.getState().saveAgentModelVariantForSession(targetSessionId, effectiveAgent, providerID, modelID, variant)
}
if (targetSessionId) {