feat: add session info panel with message count, context usage, cache stats, and skills

Add GET /bots/:bot_id/sessions/:session_id/info API endpoint that returns
per-session message count, latest input token usage with model context window,
aggregated KV cache hit rate, and skills invoked via use_skill tool calls.
Frontend Info tab in the right sidebar now displays this data in a compact
key-value layout with a context usage progress bar and clickable skill links.
This commit is contained in:
Acbox
2026-04-02 03:17:28 +08:00
parent b308c27f74
commit b3c783fb0b
16 changed files with 898 additions and 11 deletions
+1
View File
@@ -256,6 +256,7 @@ func runServe() {
provideServerHandler(handlers.NewMCPOAuthHandler),
provideOAuthService,
provideServerHandler(handlers.NewTokenUsageHandler),
provideServerHandler(handlers.NewSessionInfoHandler),
provideServerHandler(handlers.NewBrowserContextsHandler),
provideServerHandler(handlers.NewSupermarketHandler),
provideServerHandler(provideCLIHandler),
+1
View File
@@ -183,6 +183,7 @@ func runServe() {
provideServerHandler(handlers.NewMCPOAuthHandler),
provideOAuthService,
provideServerHandler(handlers.NewTokenUsageHandler),
provideServerHandler(handlers.NewSessionInfoHandler),
provideServerHandler(handlers.NewBrowserContextsHandler),
provideServerHandler(provideCLIHandler),
provideServerHandler(provideWebHandler),