Add the statusline. Fix the installation.

This commit is contained in:
2025-12-16 00:15:25 +00:00
parent be4a7c19d0
commit bc4e9e66ae
14 changed files with 582 additions and 60 deletions
+9 -5
View File
@@ -74,12 +74,16 @@ func (s *ObservationStore) StoreObservation(ctx context.Context, sdkSessionID, p
id, _ := result.LastInsertId()
// Cleanup old observations beyond the limit for this project
// Cleanup old observations beyond the limit for this project (async to not block handler)
if project != "" {
deletedIDs, _ := s.CleanupOldObservations(ctx, project)
if len(deletedIDs) > 0 && s.cleanupFunc != nil {
s.cleanupFunc(ctx, deletedIDs)
}
go func(proj string) {
cleanupCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
deletedIDs, _ := s.CleanupOldObservations(cleanupCtx, proj)
if len(deletedIDs) > 0 && s.cleanupFunc != nil {
s.cleanupFunc(cleanupCtx, deletedIDs)
}
}(project)
}
return id, nowEpoch, nil
+9 -5
View File
@@ -51,11 +51,15 @@ func (s *PromptStore) SaveUserPromptWithMatches(ctx context.Context, claudeSessi
id, _ := result.LastInsertId()
// Cleanup old prompts beyond the global limit
deletedIDs, _ := s.CleanupOldPrompts(ctx)
if len(deletedIDs) > 0 && s.cleanupFunc != nil {
s.cleanupFunc(ctx, deletedIDs)
}
// Cleanup old prompts beyond the global limit (async to not block handler)
go func() {
cleanupCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
deletedIDs, _ := s.CleanupOldPrompts(cleanupCtx)
if len(deletedIDs) > 0 && s.cleanupFunc != nil {
s.cleanupFunc(cleanupCtx, deletedIDs)
}
}()
return id, nil
}