Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(erinnerungen): die automatische Extraktion steht ab Werk an

purpleb168692bfabd
diff --git a/src/components/settings/MemorySettings.tsx b/src/components/settings/MemorySettings.tsx
index ca20a1e2..14a01f52 100644
--- a/src/components/settings/MemorySettings.tsx
+++ b/src/components/settings/MemorySettings.tsx
@@ -410,7 +410,7 @@ function MemorySettingsPanel() {
machte aus einer Einstellung eine Warnung. */}
<Zap size={11} className="text-gray-500" />
<span className="text-[0.65rem] text-gray-400">Auto-extract memories</span>
- <span className="text-[0.5rem] text-gray-600">(extra inference)</span>
+ <span className="text-[0.5rem] text-gray-600">(extra inference, on out of the box)</span>
</div>
<button
onClick={() => updateMemorySettings({ autoExtractEnabled: !settings.autoExtractEnabled })}
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index 7bbc2d3a..6765d341 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -73,7 +73,22 @@ export const DEFAULT_SETTINGS: Settings = {
// already answers with "off". A version bump that buys nothing costs a full
// state loss on downgrade (lib/persist-version.ts, DOWNGRADE-KONTRAKT).
autoCompactThreshold: 0,
- memoryCloudOptIn: false,
+ // R5-27, Entscheid David vom 12.09.2026: die automatische Erinnerungs-
+ // Extraktion steht ab Werk AN, auch auf LU Cloud. Bis dahin stand sie im
+ // Desktop still auf aus und im Web still auf an, und im Desktop gab es
+ // keinen Schalter, der sie je eingeschaltet haette: der Kunde bekam eine
+ // Funktion, die er weder sah noch abstellen musste, weil sie nie lief.
+ //
+ // Die Kosten stehen dafuer am Schalter (`EXTRAKTIONSKOSTEN` in
+ // components/settings/MemorySettings.tsx, drei Saetze fuer drei Zahlwege),
+ // und `autoExtractEnabled` in den Erinnerungseinstellungen schaltet die
+ // ganze Sache mit einem Klick ab.
+ //
+ // NUR NEUE PROFILE: die Migration in stores/settingsStore.ts bleibt
+ // unangetastet und ist rein additiv ({ ...DEFAULT_SETTINGS, ...gespeichert }).
+ // Ein Profil, in dem dieser Wert schon steht, behaelt seinen eigenen. Kein
+ // Einmal-Reset, das waere der Fehler aus v10 und v19 (DOWNGRADE-KONTRAKT).
+ memoryCloudOptIn: true,
codexDefaultMode: 'ask' as const,
builtinEngine: {
ctx: 8192,
diff --git a/src/lib/silent-model-calls.ts b/src/lib/silent-model-calls.ts
index 4c3bab54..d62442af 100644
--- a/src/lib/silent-model-calls.ts
+++ b/src/lib/silent-model-calls.ts
@@ -11,7 +11,10 @@
* instead of each call site re-deciding:
*
* 1. GATE — on lu-cloud a silent call needs `settings.memoryCloudOptIn`.
- * Default off means a cloud conversation fires NO hidden request at all.
+ * Since David's decision of 12.09.2026 that setting ships ON, so a fresh
+ * profile does extract on a cloud conversation; a profile that already
+ * carries the old `false` keeps it, and `autoExtractEnabled` in the memory
+ * settings switches the whole thing off in one click.
* Local backends (Ollama, built-in engine, LM Studio) and BYOK keys are
* not gated: those calls cost the user nothing we bill for, and BYOK
* already has its own switch (memory settings `autoExtractInAllModes`).
diff --git a/src/stores/__tests__/die-extraktion-steht-ab-werk-an.test.ts b/src/stores/__tests__/die-extraktion-steht-ab-werk-an.test.ts
new file mode 100644
index 00000000..8e0f86bc
--- /dev/null
+++ b/src/stores/__tests__/die-extraktion-steht-ab-werk-an.test.ts
@@ -0,0 +1,45 @@
+/**
+ * R5-27 und R2-48, Entscheid David vom 12.09.2026: die automatische
+ * Erinnerungs-Extraktion steht ab Werk AN.
+ *
+ * Drei Tore standen davor, und im Desktop war das dritte still zu. Die zwei
+ * Schalter in den Erinnerungseinstellungen standen auf an, das Kostentor
+ * `memoryCloudOptIn` stand auf aus, und es gab keine Oberflaeche, die es
+ * geoeffnet haette. Auf LU Cloud lief die Extraktion damit nie, und niemand
+ * konnte das merken: eine Funktion, die nichts tut, meldet sich nicht.
+ *
+ * Der zweite Test ist die Grenze des Entscheids. Nur NEUE Profile bekommen die
+ * Vorgabe. Die Migration wird nicht angefasst, sie bleibt rein additiv, und
+ * ein Profil, in dem der alte Wert steht, behaelt ihn. Ein Einmal-Reset waere
+ * genau der Fehler aus v10 und v19 (DOWNGRADE-KONTRAKT).
+ *
+ * Run: npx vitest run src/stores/__tests__/die-extraktion-steht-ab-werk-an.test.ts
+ */
+import { describe, expect, it } from 'vitest'
+import { DEFAULT_SETTINGS } from '../../lib/constants'
+import { silentCallAllowed } from '../../lib/silent-model-calls'
+import { useMemoryStore } from '../memoryStore'
+import { useSettingsStore } from '../settingsStore'
+
+describe('die automatische Erinnerungs-Extraktion', () => {
+ it('steht bei einem frischen Profil an, auch auf LU Cloud', () => {
+ const settings = useMemoryStore.getState().settings
+ expect(settings.autoExtractEnabled, 'der Hauptschalter').toBe(true)
+ expect(settings.autoExtractInAllModes, 'ausserhalb des Agentenmodus').toBe(true)
+ expect(DEFAULT_SETTINGS.memoryCloudOptIn, 'das Kostentor auf LU Cloud').toBe(true)
+ // Das Tor ist die Stelle, an der es im Desktop still endete.
+ expect(silentCallAllowed('lu-cloud', DEFAULT_SETTINGS.memoryCloudOptIn)).toBe(true)
+ // Und die eigene Maschine war nie betroffen: dort gab es nie eine Rechnung.
+ expect(silentCallAllowed('ollama', false)).toBe(true)
+ })
+
+ it('laesst ein bestehendes Profil bei seinem eigenen Wert', () => {
+ const migrate = useSettingsStore.persist.getOptions().migrate
+ expect(migrate, 'die Migration ist weg').toBeTypeOf('function')
+ const alt = migrate!(
+ { settings: { ...DEFAULT_SETTINGS, memoryCloudOptIn: false }, personas: [] },
+ 21,
+ ) as { settings: { memoryCloudOptIn: boolean } }
+ expect(alt.settings.memoryCloudOptIn, 'die Migration hat den Wert ueberschrieben').toBe(false)
+ })
+})
diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.ts
index 38c60508..81f1792b 100644
--- a/src/stores/settingsStore.ts
+++ b/src/stores/settingsStore.ts
@@ -64,7 +64,8 @@ import { isRecord, asString } from '../types/json-guards'
// Windows/Linux appMode reflects a real user choice and is never touched.
// v20 (2.6.6): added settings.contextDecay (default true) and
// settings.codexSendWindowTokens (default 64000) for the tool-result age decay,
-// plus settings.memoryCloudOptIn (default false, plan A7) and
+// plus settings.memoryCloudOptIn (plan A7; the DEFAULT moved to true on
+// 12.09.2026, this migration is untouched and stays purely additive) and
// settings.codexDefaultMode (default 'ask', plan C1); all four ride the
// default-merge, strictly additive, no one-shot reset (R1 downgrade contract)
// and the paid-provider send cap. STRICTLY ADDITIVE and IDEMPOTENT: the merge
diff --git a/src/types/agent-mode.ts b/src/types/agent-mode.ts
index 76de489d..4897490f 100644
--- a/src/types/agent-mode.ts
+++ b/src/types/agent-mode.ts
@@ -188,9 +188,11 @@ export interface MemoryFile {
export interface MemorySettings {
// Both ship ON: stores/memoryStore.ts sets them true for a fresh profile and
- // for the migration of an old one. Auto-extraction is therefore opt-OUT, and
- // it costs a second inference call. Whether that default is right is David's
- // call; this comment only stops describing the opposite of what ships.
+ // for the migration of an old one. Auto-extraction is opt-OUT, and it costs
+ // a second inference call. David decided that on 12.09.2026 (R2-48, R5-27),
+ // together with the cloud gate that used to keep it silently dead on the
+ // desktop (settings.memoryCloudOptIn, lib/constants.ts). What it costs
+ // stands next to the switch that turns it off.
autoExtractEnabled: boolean // default true, costs extra inference
autoExtractInAllModes: boolean // default true, also extract outside agent mode
maxMemoriesInPrompt: number // default 10 (legacy; retrieval uses the budget tier / override)