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.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(memory): MD_ITEM liest jetzt auch Webs Trenner beim Markdown-Import (R5-23)
purple444768088655
diff --git a/src/stores/__tests__/memory-markdown-roundtrip.test.ts b/src/stores/__tests__/memory-markdown-roundtrip.test.tsindex df6fd4fe..8e196fca 100644--- a/src/stores/__tests__/memory-markdown-roundtrip.test.ts+++ b/src/stores/__tests__/memory-markdown-roundtrip.test.ts@@ -220,3 +220,48 @@ describe('memory markdown import: Rueckwaertskompatibilitaet (Opus-Review Nachbeexpect(useMemoryStore.getState().entries[0].content).toBe(multiline)})})++// ── R5-23: a file exported by the other app must not lose tags/source/date ──+//+// apps/web/stores/memoryStore.ts writes a different separator pair: a colon+// after the title and a middle dot before the date, instead of Desktop's+// comma. Desktop's own export format is unchanged (that half of R5-23 is+// Desktop's to set), but the import side now reads every separator either+// app writes, so a memory file that crossed apps once is not the one that+// gets silently truncated.+describe('memory markdown import: liest auch Webs Trenner (R5-23)', () => {+ beforeEach(reset)++ it('a line written the way Web writes it survives import with tag, source and date', () => {+ // The middle dot (·) before the date is Web's own separator,+ // written as a code point for the same house-rule reason MD_ITEM's own+ // dashes are: this is not a banned em/en dash, but no separator this+ // file matches against belongs in the source as a literal character.+ const md =+ '# Memory\n\n## User\n\n'+ + '- **Web Titel**: web content here [tag-eins, tag-zwei] *(web-export)*' + '·' + ' 2026-05-01\n\n'++ const result = useMemoryStore.getState().importFromMarkdown(md)++ expect(result.added).toBe(1)+ const back = useMemoryStore.getState().entries[0]+ expect(back.title).toBe('Web Titel')+ expect(back.content).toBe('web content here')+ expect(back.tags).toEqual(['tag-eins', 'tag-zwei'])+ expect(back.source).toBe('web-export')+ })++ it('the colon-only title separator (no source, no date) also parses', () => {+ const md = '# Memory\n\n## User\n\n- **Nur Titel**: nur Inhalt, ohne Quelle\n\n'+ const result = useMemoryStore.getState().importFromMarkdown(md)+ expect(result.added).toBe(1)+ expect(useMemoryStore.getState().entries[0].title).toBe('Nur Titel')+ expect(useMemoryStore.getState().entries[0].content).toBe('nur Inhalt, ohne Quelle')+ })++ it('NEGATIVE CONTROL: a bare comma in the content is untouched, as before', () => {+ const md = '# Memory\n\n## User\n\n- **x**, content, with a comma\n\n'+ useMemoryStore.getState().importFromMarkdown(md)+ expect(useMemoryStore.getState().entries[0].content).toBe('content, with a comma')+ })+})diff --git a/src/stores/memoryStore.ts b/src/stores/memoryStore.tsindex 5438173e..22cc6157 100644--- a/src/stores/memoryStore.ts+++ b/src/stores/memoryStore.ts@@ -548,6 +548,16 @@ export function migrateMemoryState(persistedState: unknown, version: number): Me* two are written as code points on purpose: the house rule bans the characters* themselves from this tree, and a character class is no exception.*+ * R5-23 (3.0.1): apps/web/stores/memoryStore.ts writes a different pair of+ * separators again (`**title**: content ... *(source)* · date`, a colon and a+ * middle dot, plus the same two dashes as an accepted read variant). A memory+ * exported by one app and imported into the other silently dropped tags,+ * source and date exactly the way the 2.5.9 regression above did, just with a+ * different separator pair. Desktop's own EXPORT keeps writing comma and the+ * `isoTag` date format (that half of R5-23 is Desktop's to set), but the READ+ * side now accepts every separator either app has ever written, so a file+ * that crossed apps is never the one that gets silently truncated.+ ** The trailing date is only stripped when it follows the `*(source)*` group. A* bare `content, with a comma` keeps its comma, because there is no source to* anchor a date to.@@ -566,7 +576,7 @@ export function migrateMemoryState(persistedState: unknown, version: number): Me* group accepts an EMPTY body.*/const MD_ITEM =- /^-\s+(?:\*\*(.+?)\*\*\s*(?:,|[\u2013\u2014])\s*)?(.+?)(?:(?:\s+\[([^\]]*)\])?\s+\*\(([^)]+)\)\*(?:\s*(?:,|[\u2013\u2014])\s*(.+?))?)?$/+ /^-\s+(?:\*\*(.+?)\*\*\s*(?:,|:|[\u2013\u2014])\s*)?(.+?)(?:(?:\s+\[([^\]]*)\])?\s+\*\(([^)]+)\)\*(?:\s*(?:,|\u00b7|[\u2013\u2014])\s*(.+?))?)?$//*** R2-25 (Logikkontrolle, 3.0.1): a multi-line memory (several paragraphs, a