myagent-ai 1.16.0 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {
@@ -4520,7 +4520,24 @@ var VoiceInput = {
4520
4520
  this._processAudio();
4521
4521
  },
4522
4522
 
4523
- /** 清理音频流 */\n _cleanupStream: function() {\n // 断开 ScriptProcessor\n if (this._scriptProcessor) {\n try { this._scriptProcessor.disconnect(); } catch(e) {}\n this._scriptProcessor = null;\n }\n // 关闭 AudioContext\n if (this._audioContext && this._audioContext.state !== 'closed') {\n try { this._audioContext.close(); } catch(e) {}\n this._audioContext = null;\n }\n // 停止麦克风流\n if (this._audioStream) {\n this._audioStream.getTracks().forEach(function(t) { t.stop(); });\n this._audioStream = null;\n }\n },
4523
+ /** 清理音频流 */
4524
+ _cleanupStream: function() {
4525
+ // 断开 ScriptProcessor
4526
+ if (this._scriptProcessor) {
4527
+ try { this._scriptProcessor.disconnect(); } catch(e) {}
4528
+ this._scriptProcessor = null;
4529
+ }
4530
+ // 关闭 AudioContext
4531
+ if (this._audioContext && this._audioContext.state !== 'closed') {
4532
+ try { this._audioContext.close(); } catch(e) {}
4533
+ this._audioContext = null;
4534
+ }
4535
+ // 停止麦克风流
4536
+ if (this._audioStream) {
4537
+ this._audioStream.getTracks().forEach(function(t) { t.stop(); });
4538
+ this._audioStream = null;
4539
+ }
4540
+ },
4524
4541
 
4525
4542
  /** 将 PCM Float32 样本编码为 WAV Blob(16kHz, 单声道, 16bit) */
4526
4543
  _encodeWav: function(samples, sampleRate) {