mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user