mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:00:41 +00:00
feat(webchat): add server-side dictation
This commit is contained in:
@@ -136,6 +136,10 @@ describe("OpenClawApp dictation recorder lifecycle", () => {
|
||||
await app.toggleChatDictation();
|
||||
const recorder = MockMediaRecorder.instances[0];
|
||||
recorder.emitData(new Blob(["audio"], { type: "audio/webm" }));
|
||||
transcribeChatAudioMock.mockImplementationOnce(async () => {
|
||||
expect(app.chatDictationChunks).toEqual([]);
|
||||
return null;
|
||||
});
|
||||
|
||||
await app.toggleChatDictation();
|
||||
|
||||
|
||||
@@ -1016,7 +1016,7 @@ export class OpenClawApp extends LitElement {
|
||||
if (this.chatDictationRecorder !== recorder) {
|
||||
return;
|
||||
}
|
||||
const chunks = this.chatDictationChunks;
|
||||
const chunks = [...this.chatDictationChunks];
|
||||
this.chatDictationChunks = [];
|
||||
const canceledByRequest = this.chatDictationCancelNextStop;
|
||||
this.chatDictationCancelNextStop = false;
|
||||
|
||||
Reference in New Issue
Block a user