feat(conversation): TTS 投递与 WebSocket 管线;客户端播放门禁与会话页联动;COS 键与迁移脚本调整

This commit is contained in:
Kevin
2026-03-26 15:51:24 +08:00
parent c23931ec91
commit d990399112
22 changed files with 630 additions and 74 deletions

View 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);
});
});