feat(conversation): TTS 投递与 WebSocket 管线;客户端播放门禁与会话页联动;COS 键与迁移脚本调整
This commit is contained in:
14
app-expo/tests/features/voice/tts-playback-gate.test.ts
Normal file
14
app-expo/tests/features/voice/tts-playback-gate.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { createTtsPlaybackGate } from '@/features/voice/tts-playback-gate';
|
||||
|
||||
describe('createTtsPlaybackGate', () => {
|
||||
test('accepts TTS until interrupt, then drops until user sends', () => {
|
||||
const gate = createTtsPlaybackGate();
|
||||
expect(gate.shouldAcceptIncomingTts()).toBe(true);
|
||||
|
||||
gate.interrupt();
|
||||
expect(gate.shouldAcceptIncomingTts()).toBe(false);
|
||||
|
||||
gate.onUserMessageSent();
|
||||
expect(gate.shouldAcceptIncomingTts()).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user