mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-24 21:41:08 +02:00
fix(x): chat model-call field opens as 'Same as above' unless it differs
A chat override equal to the global limit is behaviorally identical to no override, so persist it as absent and collapse it on load. Stepping the empty chat field (which lands on the global value) no longer pins a redundant override that makes the field open with a number forever.
This commit is contained in:
parent
dd04738015
commit
af19cad43b
1 changed files with 10 additions and 1 deletions
|
|
@ -2732,7 +2732,13 @@ function AdvancedSettings({ dialogOpen }: { dialogOpen: boolean }) {
|
|||
.then((settings) => {
|
||||
if (cancelled) return
|
||||
setGlobalLimit(String(settings.maxModelCalls))
|
||||
setChatLimit(settings.chatMaxModelCalls !== undefined ? String(settings.chatMaxModelCalls) : "")
|
||||
// A chat override equal to the global limit is no override — show
|
||||
// "Same as above" (legacy files; saves already collapse this).
|
||||
setChatLimit(
|
||||
settings.chatMaxModelCalls !== undefined && settings.chatMaxModelCalls !== settings.maxModelCalls
|
||||
? String(settings.chatMaxModelCalls)
|
||||
: ""
|
||||
)
|
||||
setLoaded(true)
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
@ -2758,6 +2764,9 @@ function AdvancedSettings({ dialogOpen }: { dialogOpen: boolean }) {
|
|||
}
|
||||
chat = parsed
|
||||
}
|
||||
// An override equal to the global limit is meaningless — persist it as
|
||||
// "use the global limit" so the field reopens as "Same as above".
|
||||
if (chat === global) chat = undefined
|
||||
try {
|
||||
await window.ipc.invoke("turnLimits:setSettings", {
|
||||
maxModelCalls: global,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue