Commit graph

20 commits

Author SHA1 Message Date
Eddy
dcc42ee903 feat: Textanalyse fuer KB-Hints — Konzept-Erkennung + Bigrams + Chat-Kontext [appimage]
All checks were successful
Build AppImage / build (push) Successful in 8m32s
- Konzept-Map: ~60 deutsche Phrasen → technische Suchbegriffe
  ("Nachrichten falsch rum" → "message sort chronological")
- Bigram-Extraktion: benachbarte Content-Woerter als Phrase
- Chat-Kontext: letzte 3 User-Nachrichten fliessen in die Suche ein
- Erweiterte Tech-Terms (~40) und Stoppwort-Liste
- Keywords max 12 statt 8, Konzepte haben Vorrang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 20:53:49 +02:00
Eddy
79f4f9fb21 fix: UTF-8-Crash + Input-Reset + ApprovalBar + Scroll/Streaming-Polish [appimage]
All checks were successful
Build AppImage / build (push) Successful in 8m20s
Crash-Fix:
- src/db.rs:801 panickte mit "byte index 240 is not a char boundary"
  mitten in einem -Emoji → SIGABRT. Neues strutil-Modul mit
  safe_truncate()/safe_truncate_ellipsis() (5 Tests grün), an allen
  &s[..N]-Stellen in db/claude/knowledge/session/memory.rs eingebaut.
- update.rs: Stale Lock-Files vom letzten Crash werden jetzt
  protokolliert ("🧹 Stale Lock-Datei aus vorherigem Crash gefunden").

Chat-Polish:
- Input-Textfeld wird nach Senden zuverlässig geleert (Store-Reset +
  DOM-Reset + tick — Svelte 5 bind:value mit Auto-Subscription
  aktualisiert sonst nicht synchron).
- ApprovalBar.svelte (NEU): Sticky-Bar überm Input mit klar
  beschrifteten Buttons "Übernehmen"/"Verwerfen" statt mehrdeutigem
  "Behalten/Zurueck". Bleibt sichtbar wenn der Chat scrollt. Klick
  auf Datei-Name scrollt zur Inline-Karte und blinkt sie. Shortcuts
  Ctrl+Enter/Ctrl+Backspace.
- MessageList: Auto-Scroll trackt jetzt auch toolCalls.length und
  Status-Änderungen, plus ResizeObserver am Container. Smooth bei
  kleinen Distanzen, instant bei großen.
- Streaming-Caret: pulsierender Block-Cursor mit Glow-Shadow.
- Tool-Cards: Slide-In-Transition + Shimmer-Animation auf running.
- WorkingIndicator: Verb passt sich an processingPhase an.
2026-04-27 20:55:08 +02:00
Eddy
fec8aea22c feat: KB-Hints, Voice-Konversation, Chat-Darstellung, Cross-Session-Recall [appimage]
All checks were successful
Build AppImage / build (push) Successful in 8m8s
- Block A: KB-Hint-Pillen im Chat (💡) über Tool-Cards, Klick öffnet KB-Browser
- Block B: KB-Usage-Tracking (usage_count/last_used), Sortier-Boost für bewährte Einträge
- Block C: Cross-Session-Recall per SQLite-FTS5 (🕒 Pille "Schon mal beantwortet")
- Block D: Voice-Konversationsmodus (Langes Halten = Loop mit Barge-In-Unterbrechung)
- Block F: Select-Button im Audit-Log (appearance:none + SVG-Chevron, WebKitGTK-Fix)
- Block G: Chat-Darstellungseinstellungen (Schriftart, -größe, Zeilenhöhe, Code-Größe)
- WorkingIndicator: Deutsche Animationstexte beim Verarbeiten

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 16:54:58 +02:00
Eddy
6d3a0d8740 fix: Bridge-EPIPE-Endlosschleife + monitor_events-Schneeball verhindern [appimage]
All checks were successful
Build AppImage / build (push) Successful in 8m24s
Ursache: Bridge schrieb bei EPIPE-Fehler (Tauri-Pipe geschlossen) einen
monitor_event, der selbst wieder EPIPE warf -> uncaughtException-Loop.
Ergebnis: 1.082.260 identische Fehler-Eintraege, DB auf 293 MB angewachsen,
App hing beim Start am Index-Scan dieser Tabelle.

Bridge (scripts/claude-bridge.js):
- crashHandlerActive-Flag verhindert Re-Eintreten der Handler
- isPipeError() erkennt EPIPE/ERR_STREAM_DESTROYED/ERR_STREAM_WRITE_AFTER_END
- Bei Pipe-Fehler: process.exit(0) statt Schreibversuch
- stdout/stderr error-Listener als Erstausloeser-Sperre
- Alle sendEvent/sendMonitorEvent-Aufrufe in try/catch isoliert

Schema (src-tauri/src/db.rs):
- Trigger cleanup_old_monitor_events war AFTER INSERT (lief bei jedem Insert)
  -> bei 1 Mio Zeilen O(n) DELETE pro Event = O(n^2)-Schneeball
- Neuer Trigger: WHEN COUNT > 50000, behaelt juengste 30000, loescht >7d alt
- DROP TRIGGER vor CREATE damit Migration auf bestehenden DBs greift

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 15:58:10 +02:00
Eddy
c779fa7fc5 feat: Phase 7 — Accept/Reject DiffView, @-Mentions, Checkpoint/Rewind [appimage]
All checks were successful
Build AppImage / build (push) Successful in 10m19s
Accept/Reject DiffView:
- Bridge sendet checkpoint-before/after Events bei Edit/Write
- Rust speichert Datei-Snapshots in SQLite (content_before/after)
- Frontend zeigt interaktive DiffView mit Accept/Reject-Buttons
- Bei Reject: Datei wird automatisch auf Zustand VOR der Aenderung zurueckgesetzt
- Neues Modul: checkpoint.rs mit Accept/Reject/Rewind Commands

@-Mentions (Datei-Referenzen):
- @datei.ts im Chat-Input oeffnet Fuzzy-Autocomplete
- Fuzzy-Suche scannt Projektverzeichnis (max 5000 Dateien)
- Score-basiertes Ranking (Anfang, Separator, konsekutive Matches)
- Bei Auswahl: Dateiinhalt wird in Prompt injiziert (als Code-Block)
- @datei.ts#5-10 fuer Zeilenbereiche
- Neue Komponente: FileMention.svelte

Checkpoint/Rewind:
- Automatische Snapshots bei jeder Dateiänderung (Edit/Write)
- SQLite-Tabelle checkpoints mit content_before/content_after
- Rewind: Alle Dateien ab einem Checkpoint zuruecksetzen
- Commands: accept_change, reject_change, list_checkpoints, rewind_to_checkpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 08:56:56 +02:00
Eddy
f69f566b00 [appimage] Technische Schulden: Cargo Warnings + Bridge Error-Handling + Chat-Layout
All checks were successful
Build AppImage / build (push) Successful in 9m13s
- Cargo Warnings: 0 (dead_code allow für load_sessions, invalidate_expired)
- Bridge: uncaughtException + unhandledRejection Handler, Ollama .catch()
- Rust: Parse-Fehler bei Bridge-Nachrichten werden geloggt statt verschluckt
- Chat-Panel: Detach-Layout Fix bereits enthalten (flex-shrink, min-height)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 14:40:38 +02:00
Eddy
d29bbd7bfd fix: Rusqlite Borrow-Lifetime in load_sessions_filtered [appimage]
All checks were successful
Build AppImage / build (push) Successful in 8m10s
stmt.query_map()?.collect() direkt als Return-Expression hält den
Borrow über den Block-End hinaus. Fix: Ergebnis erst in let binden,
dann returnen — so wird der Temporary vor stmt gedroppt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 13:54:32 +02:00
Eddy
b9dfc8a720 fix: UTF-8 Panic bei String-Truncation (db.rs + knowledge.rs) [appimage]
Some checks failed
Build AppImage / build (push) Failing after 3m34s
Crash: "byte index 200 is not a char boundary; inside '─' (bytes 198..201)"
Fix: char_indices() statt byte-slice für sicheres Abschneiden bei
Multi-Byte-Zeichen (ä, ü, ─, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 13:49:21 +02:00
Eddy
a3d1dadc46 fix: Session-Filter vereinfacht + Piper/Whisper Modell-Pfade erweitert [appimage]
Some checks failed
Build AppImage / build (push) Failing after 3m9s
- db.rs: load_sessions_filtered() ohne shared row_mapper (Borrow-Probleme)
- voice.rs: Modell-Suche auch in ~/.local/share/claude-desktop/models/
  und ~/.claude-desktop/models/ (AppImage + Nix-Wrapper Kompatibilität)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 13:40:51 +02:00
Eddy
c2db56f392 feat: Sessions an Projekt/Workspace binden [appimage]
Some checks failed
Build AppImage / build (push) Failing after 3m54s
Sessions werden jetzt nach aktivem Projekt gefiltert (working_dir).
Beim Projektwechsel sieht man nur noch die Sessions die zu diesem
Projekt gehören. Backend: load_sessions_filtered() mit optionalem
WHERE working_dir-Filter. Ohne Projekt: alle Sessions (abwärtskompatibel).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 13:27:33 +02:00
Eddy
68d2500037 feat: Projekt-Wechsel, File-Drop, Persistent Memory [appimage]
All checks were successful
Build AppImage / build (push) Successful in 8m45s
- Projekt-Wechsel UI in SessionList: Dropdown, Hinzufügen/Entfernen, auto Sticky-Context
- File-Drop auf Chat: Text als Code-Block, Bilder als Base64, 500KB Limit
- Persistent Memory: auto_load Einträge in Claude-Context injiziert (Cross-Session)
- Memory CRUD Tauri-Commands: save/delete/list/autoload
- Svelte 5 Syntax-Fix: on:click → onclick in SessionList.svelte

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 10:55:35 +02:00
Eddy
2de88a2a22 [appimage] Phase 2.0: Proaktive Intelligenz
All checks were successful
Build AppImage / build (push) Successful in 8m19s
- MySQL Pool als Managed State (MysqlPoolState in lib.rs)
- Keyword-Extraktion aus User-Nachrichten (Stoppwort-Filter DE/EN)
- Proaktive KB-Abfrage bei SessionStart (proactive_session_hints)
- Auto-Fehler-Pattern: error_tracker Tabelle, bei 3+ Occurrences
  automatisch KB-Eintrag in Kategorie 'fehler' erstellen
- 6 neue Tauri-Commands für KB-Hints und Error-Tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 14:19:29 +02:00
Eddy
f51241efa6 Phase 10 Sprach-Interface + Phase 9 Nacharbeiten
Voice (Phase 10):
- voice.rs: OpenAI Whisper (STT) + TTS Backend
- ChatPanel: Mikrofon-Button, VAD (Pause 1.5s), Live-Pegel
- SettingsPanel: OpenAI-Key Konfiguration

Phase 9 Nacharbeiten:
- Auto-Extract vor Compacting (Entscheidungen/TODOs/Insights)
- get_tool_hints() - relevante KB-Eintraege bei Tool-Start
- activeKnowledgeHints Store, Anzeige im KnowledgePanel

Tech-Schulden:
- Dead-Code in memory.rs entfernt (MemorySystem struct)
- cargo-check Warnings behoben

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:24:28 +02:00
Eddy
51239d6639 Sticky Context Auto-Load beim App-Start
- init_sticky_context Tauri Command: Lädt Context aus DB, sendet an Bridge
- Frontend ruft Command beim Start auf (+layout.svelte)
- StickyContextInfo Store für Status-Tracking
- Context-Badge im Footer (📌 +XXctx Token)
- Zeigt Anzahl Einträge und Token-Schätzung

Bugfixes:
- context.rs: Typ-Annotationen in Closures (String statt str)
- db.rs: conn als pub(crate) für Module-Zugriff
- memory.rs: get_sticky_context → get_sticky_memory_entries (Namenskonflikt)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-14 14:39:39 +02:00
Eddy
9d73684ece Monitor-Events Backend-Persistierung in SQLite
- MonitorEvent Struct + CRUD-Methoden in db.rs
- monitor_events Tabelle mit Auto-Cleanup (7 Tage)
- Tauri Commands: save/load/clear_monitor_events
- Frontend: Events beim Start laden, beim Hinzufügen speichern
- Async clearMonitorEvents löscht auch DB-Einträge

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-14 14:22:31 +02:00
Eddy
abaf4eb9bf Phase 6: Session-Management Verbesserungen
- Session Auto-Load bei App-Start (aktive Session + Nachrichten)
- agent_id Spalte in messages-Tabelle für Agent-Zuordnung
- DbMessage Interface erweitert (agent_id)
- Session-Compacting: compact_session() fasst alte Nachrichten zusammen
- Standard: 30 letzte Nachrichten behalten, Rest als Summary

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-14 13:05:16 +02:00
Eddy
4ba14a53e1 Session-Historie: Nachrichten werden persistent gespeichert
- Neue messages-Tabelle in SQLite für Chat-Nachrichten
- save_message, load_messages, clear_messages Tauri-Commands
- User-Nachrichten werden beim Senden sofort gespeichert
- Assistant-Nachrichten werden nach Abschluss gespeichert
- Beim Session-Wechsel werden Nachrichten aus DB geladen
- currentSessionId Store für Session-Tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-14 10:35:04 +02:00
Eddy
433e2de2b6 Modell-Auswahl in Settings implementiert
- Neues SettingsPanel mit Modell-Auswahl (Haiku/Sonnet/Opus)
- Modell wird in SQLite persistiert (claude_model Setting)
- Bridge unterstützt set-model und get-models Commands
- Modell kann zur Laufzeit gewechselt werden
- Preisanzeige pro Modell im Settings-Panel
- Aktuelles Modell wird beim App-Start geladen

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-14 09:32:26 +02:00
Eddy
f101661016 Phase 5: Session-Verwaltung + permanente Konversationen
- session.rs: Neues Modul mit 7 Tauri-Commands (CRUD, Resume, aktive Session)
- db.rs: Sessions-Tabelle + CRUD-Methoden (bleiben bis User sie löscht)
- claude.rs: Session-ID und Token/Kosten automatisch in DB speichern
- SessionList.svelte: Sidebar mit Session-Liste, Erstellen, Fortsetzen, Löschen
- +page.svelte: 4-Panel Layout (Sessions | Chat | Aktivität | Agents)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 19:11:17 +02:00
Eddy
f5ca5bca7c Phase 3: SQLite-Persistierung, Guard-Rails Integration + Claude Bridge
- db.rs: Vollständige SQLite-Schicht (Permissions, Audit, Memory, Patterns, Settings)
- guard.rs: Risiko-Klassifikation + Freigabe-Management in lib.rs integriert
- scripts/claude-bridge.js: Node.js Bridge für Claude CLI (stream-json, NDJSON)
- audit.rs + memory.rs: An SQLite angebunden statt In-Memory
- Frontend: MemoryPanel + AuditLog laden echte Daten via Tauri-Commands
- shell.nix: Rust-Toolchain aus nixpkgs statt rustup
- Build: cargo check + npm run build erfolgreich

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:28:35 +02:00