Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class GeminiSession implements VoiceAgentSession {
this.session.sendClientContent({
turns: [
{
text: 'IMPORTANT: The game time has expired. You must now: 1) Tell the players that time is up, 2) Evaluate how close they were to solving the riddle, 3) IMMEDIATELY call the endGame function to close the game session. Do not wait for player response - call endGame right after your message.',
text: 'IMPORTANT: The game time has expired. You must now: 1) Tell the players that time is up, 2) Evaluate how close they were to solving the riddle.',
},
],
turnComplete: true,
Expand All @@ -73,6 +73,7 @@ export class GeminiSession implements VoiceAgentSession {
async open() {
if (this.opening) return;
this.opening = true;
this.ending = false;

const params: LiveConnectParameters = {
model: GEMINI_MODEL,
Expand Down
1 change: 1 addition & 0 deletions deep-sea-stories/packages/backend/src/game/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export class GameRoom {
console.log(`⏰ Game time limit reached for room ${this.roomId}`);
try {
await this.gameSession?.announceTimeExpired();
await this.stopGame(true)
} catch (e) {
console.error('Error announcing time expired:', e);
}
Expand Down
Loading