Skip to content

Conversation

@Gawor270
Copy link
Member

@Gawor270 Gawor270 commented Dec 9, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 9, 2025 17:23
@linear
Copy link

linear bot commented Dec 9, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a configurable game time limit with automatic agent announcements when time expires, and adds session resumption with automatic reconnection for the Gemini voice agent.

  • Adds timeout mechanism to automatically announce game time expiration and guide the agent to end the game
  • Implements session resumption and auto-reconnection logic for Gemini sessions to handle connection interruptions
  • Updates the endGame function description to clarify when it should be called by the agent

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
deep-sea-stories/packages/backend/src/game/session.ts Adds announceTimeExpired() method to mute the agent and notify it when game time limit is reached
deep-sea-stories/packages/backend/src/game/room.ts Implements game timeout using setTimeout and cleans up timeout on game stop
deep-sea-stories/packages/backend/src/agent/session.ts Adds announceTimeExpired() method to the VoiceAgentSession interface
deep-sea-stories/packages/backend/src/agent/gemini/session.ts Implements timeout announcement, session resumption via handle, auto-reconnection on unexpected closure, and improved state management with opening/reconnecting flags
deep-sea-stories/packages/backend/src/agent/elevenlabs/session.ts Adds stub implementation of announceTimeExpired() for ElevenLabs session (handled by platform)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Gawor270 Gawor270 changed the title Make session time arbitrary, agent game ending sentences Make session time arbitrary, agent game ending monologue Dec 9, 2025
Copy link
Member

@AHGIJMKLKKZNPJKQR AHGIJMKLKKZNPJKQR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

The timeout didn't work.
I also was able to undeafen the agent while it was saying the closing speech.
Maybe it would be better to "server-deafen" the agent instead, by just not forwarding the audio tracks to it when the game timed out

@Gawor270 Gawor270 merged commit 51b6f1c into main Dec 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants