Dashboard-Performance: API-Endpoints konsolidieren

Backend:
- GET /api/sessions: Git-Status inline integriert (parallel pro Session)
  - Neue Hilfsmethoden GetGitStatusSummaryAsync (Counts) und
    GetGitStatusDetailedAsync (Dateinamen, für Einzel-Endpoint)
  - GetSessionsWithStats gibt typisierte SessionWithStats zurück
  - Neue Models: SessionWithStats, GitStatusSummary
- GET /api/agents: Skills inline pro Agent integriert
  - SkillService als Parameter in HandleList
  - Skills als Array mit slug/name/description

Frontend:
- Dashboard: 1 paralleler Promise.all statt sequentieller Requests
  - Vorher: agents → sessions → N×git-status → M×agent-skills → cronjobs → shares
  - Nachher: Promise.all([agents, sessions, cronjobs, shares]) (4 Requests)
  - Git-Status direkt aus Session-Response, Skills aus Agent-Response
- Session-Page: Agent-Skills aus inline-Daten statt N×apiGetAgentSkills

Reduziert Dashboard-Requests von ~4+N+M auf 4 (fix).
This commit is contained in:
Meleki committed 2026-03-07 19:40:26 +01:00
1 parent 0dcc05ebf9
commit 11acfde081
7 files changed
+265 -119

No files matched your search

+18
View File
@@ -27,3 +27,21 @@ public class SessionRecord
public string CreatedAt { get; set; }
public string UpdatedAt { get; set; }
}
public class SessionWithStats
{
public SessionRecord Session { get; set; }
public int MessageCount { get; set; }
public int ArchiveMessageCount { get; set; }
public int TotalMessageCount { get; set; }
public bool TelegramConfigured { get; set; }
public bool TelegramLinked { get; set; }
}
public class GitStatusSummary
{
public int Add { get; set; }
public int Edit { get; set; }
public int Delete { get; set; }
public int Outgoing { get; set; }
}