Add per-conversation notes.md

Gives each conversation an opt-in, persistent memory file the model reads
automatically every turn and writes to on its own initiative via a fenced
```update-notes``` block in its reply — no per-write approval, matching the
Confab-as-CLAUDE.md-for-itself concept Rune wanted. /notes on|off|show,
files live in ~/Library/Application Support/oAI/notes/, embedded ID header
for future Git Sync compatibility. Adds DB migration v12.
This commit is contained in:
2026-08-04 07:58:47 +02:00
parent 32e6ce3c37
commit 3414e37e24
14 changed files with 581 additions and 18 deletions
@@ -107,4 +107,12 @@ extension String {
let endIndex = index(startIndex, offsetBy: length - trailing.count)
return String(self[..<endIndex]) + trailing
}
// MARK: - Filename Sanitization
/// Replaces characters invalid in filenames (on macOS/most filesystems) with "-".
func sanitizedForFilename() -> String {
let invalid = CharacterSet(charactersIn: "/\\:*?\"<>|")
return components(separatedBy: invalid).joined(separator: "-")
}
}