mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-17 00:14:50 +00:00
fix: memory flush UI default should match backend (ON, not OFF) (#115)
Backend defaults memoryFlush.enabled to true when config is nil (memoryflush.go:39-46), but UI used `?? false` showing OFF. Also fix sub-fields visibility to show when flush is defaulted ON. Co-authored-by: Luvu182 <208665161+Luvu182@users.noreply.github.com>
This commit is contained in:
1 parent
c8dc9917fe
commit
99110c4496
1 file changed
+2
-2
@@ -65,14 +65,14 @@ export function CompactionSection({ enabled, value, onToggle, onChange }: Compac
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<Switch
|
||||
checked={value.memoryFlush?.enabled ?? false}
|
||||
checked={value.memoryFlush?.enabled ?? true}
|
||||
onCheckedChange={(v) =>
|
||||
onChange({ ...value, memoryFlush: { ...value.memoryFlush, enabled: v } })
|
||||
}
|
||||
/>
|
||||
<InfoLabel tip="When enabled, compacted history is also saved to long-term memory for future retrieval.">{t(`${s}.memoryFlush`)}</InfoLabel>
|
||||
</div>
|
||||
{value.memoryFlush?.enabled && (
|
||||
{(value.memoryFlush?.enabled ?? true) && (
|
||||
<div className="space-y-2 pl-6">
|
||||
<InfoLabel tip="Token count threshold that triggers memory flush. When summary exceeds this, older memories are flushed to storage.">{t(`${s}.softThreshold`)}</InfoLabel>
|
||||
<Input
|
||||
|
||||
Reference in new issue
Block a user