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(speicher): der Typkommentar sagt nicht mehr das Gegenteil des Ausgelieferten

purplee0419082f9ba
diff --git a/src/stores/__tests__/stores.test.ts b/src/stores/__tests__/stores.test.ts
index c15a4b31..6ce7a6e1 100644
--- a/src/stores/__tests__/stores.test.ts
+++ b/src/stores/__tests__/stores.test.ts
@@ -717,5 +717,20 @@ describe('memoryStore', () => {
useMemoryStore.getState().updateMemorySettings({ autoExtractEnabled: true })
expect(useMemoryStore.getState().settings.autoExtractEnabled).toBe(true)
})
+
+ it('beide Extraktionsschalter kommen ab Werk auf an', () => {
+ // R2-48 und R5-40: der Typkommentar in types/agent-mode.ts sagte
+ // "default false", ausgeliefert wird true. Der Kommentar ist
+ // nachgezogen, diese Zeile haelt ihn und den Zustand zusammen.
+ // Ob die Vorbelegung selbst richtig ist, ist Entscheid David; dieser
+ // Fall behauptet nur, was heute ausgeliefert wird.
+ //
+ // getInitialState(), nicht getState(): der Fall eine Zeile darueber
+ // schaltet denselben Schalter an, und gegen einen gesetzten Wert zu
+ // pruefen beweist nichts ueber die Vorbelegung.
+ const werk = useMemoryStore.getInitialState().settings
+ expect(werk.autoExtractEnabled).toBe(true)
+ expect(werk.autoExtractInAllModes).toBe(true)
+ })
})
})
diff --git a/src/types/agent-mode.ts b/src/types/agent-mode.ts
index bce75f71..76de489d 100644
--- a/src/types/agent-mode.ts
+++ b/src/types/agent-mode.ts
@@ -178,7 +178,7 @@ export interface MemoryFile {
// undefined as "not stale".
/** Id of the newer entry that replaced this one (UPDATE write-decision). */
supersededBy?: string
- /** Id of the entry this one replaced — back-pointer for audit / UI. */
+ /** Id of the entry this one replaced: back-pointer for audit / UI. */
supersedesId?: string
/** Explicitly flagged outdated → excluded from live retrieval, kept on disk. */
stale?: boolean
@@ -187,8 +187,12 @@ export interface MemoryFile {
}
export interface MemorySettings {
- autoExtractEnabled: boolean // default false — opt-in (costs extra inference)
- autoExtractInAllModes: boolean // default false — whether to also extract outside agent mode
+ // 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.
+ 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)
maxMemoryChars: number // default 3000
// User override for how many memories get injected into the prompt. null =