fix(chat): persist default thinking variant selection (#492)
Treat selecting Default as an explicit variant clear across send-time persistence, stream metadata sync, and historical session analysis so stale non-default variants are not reapplied.
This commit is contained in:
@@ -397,14 +397,12 @@ export const useSessionStore = create<SessionStore>()(
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (variant !== undefined) {
|
||||
try {
|
||||
useContextStore
|
||||
.getState()
|
||||
.saveAgentModelVariantForSession(created.id, effectiveDraftAgent, draftProviderId, draftModelId, variant);
|
||||
} catch {
|
||||
// ignored
|
||||
}
|
||||
try {
|
||||
useContextStore
|
||||
.getState()
|
||||
.saveAgentModelVariantForSession(created.id, effectiveDraftAgent, draftProviderId, draftModelId, variant);
|
||||
} catch {
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -461,14 +459,12 @@ export const useSessionStore = create<SessionStore>()(
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (variant !== undefined) {
|
||||
try {
|
||||
useContextStore
|
||||
.getState()
|
||||
.saveAgentModelVariantForSession(currentSessionId, effectiveAgent, providerID, modelID, variant);
|
||||
} catch {
|
||||
// ignored
|
||||
}
|
||||
try {
|
||||
useContextStore
|
||||
.getState()
|
||||
.saveAgentModelVariantForSession(currentSessionId, effectiveAgent, providerID, modelID, variant);
|
||||
} catch {
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user