Consolidate chat timeline events + auto-end inactive sessions
Timeline consolidation: - Replace multiple LIVE_CHAT_STARTED/ENDED events with single LIVE_CHAT_SUMMARY - Show total duration accumulated across all sessions - Display session count (e.g., "23min 15s total - 3 sessoes") - Show "Ativo" badge when session is active Auto-end inactive chat sessions: - Add cron job running every minute to check inactive sessions - Automatically end sessions after 5 minutes of client inactivity - Mark auto-ended sessions with "(encerrado por inatividade)" flag 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
409da8afda
commit
115c5128a6
5 changed files with 224 additions and 2 deletions
|
|
@ -33,4 +33,12 @@ crons.interval(
|
|||
{}
|
||||
)
|
||||
|
||||
// Encerrar sessoes de chat inativas por mais de 5 minutos (sempre ativo)
|
||||
crons.interval(
|
||||
"auto-end-inactive-chat-sessions",
|
||||
{ minutes: 1 },
|
||||
api.liveChat.autoEndInactiveSessions,
|
||||
{}
|
||||
)
|
||||
|
||||
export default crons
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue