feat: rename info to status, add /status slash command

Rename session info endpoint from /sessions/:id/info to /sessions/:id/status
and update frontend tab label accordingly. Add /status slash command that
displays current session metrics (message count, context usage, cache hit
rate, used skills) as formatted text in any channel.
This commit is contained in:
Acbox
2026-04-02 03:28:48 +08:00
parent b3c783fb0b
commit 33b57ee345
14 changed files with 154 additions and 28 deletions
+9
View File
@@ -22,6 +22,15 @@ FROM bot_history_messages m
WHERE m.session_id = sqlc.arg(session_id)
AND m.usage IS NOT NULL;
-- name: GetLatestSessionIDByBot :one
SELECT s.id
FROM bot_sessions s
WHERE s.bot_id = sqlc.arg(bot_id)
AND s.type = 'chat'
AND s.deleted_at IS NULL
ORDER BY s.updated_at DESC
LIMIT 1;
-- name: GetSessionUsedSkills :many
SELECT DISTINCT
(part->'input'->>'skillName')::text AS skill_name