feat: baseline tracking service #85
Description
This merge request introduces the foundational architecture for the Tracking module and integrates it with the core application workflow. The tracking service allows us to persistently capture LLM suggestion batches and track user interactions (accepting/rejecting) with those suggestions.
Key Changes
-
Data Models & Interfaces: Defined the core tracking typings in
types.ts(LlmBatch,SuggestionEntry,InteractionEvent, etc.) and establishedITrackingWriterandITrackingReadercontract (for local exporting we want to implement reader but for api solution users should not export data). -
Storage Layer (
TrackingStorageAdapter): Implemented a local persistence layer utilizing IndexedDB to store LLM batches, generated suggestions, and user interaction events. -
Core Logic (
TrackingService): Implemented the main tracking service responsible for orchestrating tracking sessions (startLlmBatch) and logging interaction events. -
Application Integration:
- Instantiated the
TrackingServiceandTrackingStorageAdapterwithinAppProviders. - Injected the
TrackingServiceinto theLLMAnalysisService. - Instrumented the
LLMAnalysisServiceto automatically start a tracking batch when a new analysis completes and to logACCEPTandREJECTinteraction events when the user reviews a suggestion.
- Instantiated the
Related Issues
Edited by Mikuláš Mach