From 3a1bc47127a5d81b7f4f6584bdfd18bac2dd8db1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Fri, 19 Dec 2025 10:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E5=87=BAai=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E7=95=8C=E9=9D=A2=20=E6=98=AF=E9=9F=B3=E4=B9=90?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/yunqiinnovation/agent_service/AgentService.kt | 2 +- .../Sources/agent_service/AgentServiceImpl.swift | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/AgentService.kt b/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/AgentService.kt index 961f578be..acbd4f4f1 100644 --- a/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/AgentService.kt +++ b/local_plugins/agent_service/android/src/main/kotlin/com/yunqiinnovation/agent_service/AgentService.kt @@ -1210,7 +1210,7 @@ object AgentService : CoroutineScope { if (name == "exit_interaction") { BleService.closeCodec() stopRecognition() - }else if (name == "qqmusic_pause" || name == "music_pause"){ + }else if (name == "qqmusic_pause" || name == "qqmusic_stop" || name == "music_pause" || name == "music_close"){ isplaymusic = false } Log.d(TAG, "liwei--------------- AI Call onFunctionCall iscallingTool:$iscallingTool callingToolText:$callingToolText") diff --git a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift index 436a17151..6d4d9583d 100644 --- a/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift +++ b/local_plugins/agent_service/ios/agent_service/Sources/agent_service/AgentServiceImpl.swift @@ -39,7 +39,7 @@ class AgentServiceImpl: NSObject { private var config: [String: Any] = [:] // 添加音乐播放状态记录 - private var wasMusicPlayingBeforeRecognition: Bool = false + public var wasMusicPlayingBeforeRecognition: Bool = false private var isSpeaking: Bool = false @@ -1811,6 +1811,8 @@ class ChatApiStreamCallback: StreamCallback { // 关闭编码器 (设备侧) BleService.shared.closeCodec() agentService.stopRecognition() + }else if (name == "qqmusic_pause" || name == "qqmusic_stop" || name == "music_pause" || name == "music_close"){ // + agentService.wasMusicPlayingBeforeRecognition = false } try agentService.sendEvent(name: "function_call", data: [