feat(vela): retire legacy mocked turn trigger

This commit is contained in:
2026-04-08 21:50:18 +02:00
parent 28712443cc
commit 8e14eaeed0
10 changed files with 78 additions and 378 deletions

View File

@@ -11,7 +11,6 @@ const {
const WEBSOCKET_ROUTE = '/ws';
const WEBSOCKET_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';
const MOCKED_USER_TRANSCRIPT = '[mocked user] What is the current mocked vertical slice?';
const MOCKED_ASSISTANT_RESPONSE = '[mocked assistant] This is a deterministic mocked response from the gateway vertical slice.';
function createPlaceholderPartialTranscript(audioChunkCount) {
@@ -67,7 +66,7 @@ function scheduleMockedTurnStep(session, turnId, delay, callback) {
session.mockedTurnTimers.push(timer);
}
function startMockedTurn(socket, session, { transcript = MOCKED_USER_TRANSCRIPT, includeListeningState = true } = {}) {
function startMockedTurn(socket, session, { transcript, includeListeningState = true } = {}) {
if (session.mockedTurnInFlight) {
sendSocketError(socket, 'mocked_turn_in_flight', 'Only one mocked turn can run per session at a time.');
return;
@@ -246,7 +245,11 @@ function handleClientMessage(socket, session, rawMessage) {
sendSocketMessage(socket, 'session.state', { value: session.state });
break;
case 'mocked.turn.trigger':
startMockedTurn(socket, session);
sendSocketError(
socket,
'unsupported_mocked_turn_trigger',
'mocked.turn.trigger is no longer supported; use input_audio.append and input_audio.commit instead.'
);
break;
case 'input_audio.append':
if (session.mockedTurnInFlight) {