Revert "fix(ui): stop pinning inherited effort as a session choice on send"
This reverts commit 0a47b306d6.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user