Browse Source

上传代码

weicu
liwei1dao 1 year ago
parent
commit
e568265fee
  1. 7
      lib/modules/agent/controllers/agent_controller.dart
  2. 2
      local_plugins/chat_api/android/src/main/kotlin/com/yunqiinnovation/chat_api/ChatApiService.kt

7
lib/modules/agent/controllers/agent_controller.dart

@ -507,9 +507,10 @@ class AgentController extends GetxController {
} else {
// 只有在非按住说话模式且非打电话模式下才自动切换到文字模式
// 按住说话模式下应该保持在语音模式,等待下次按住
if (!isPhoneCallMode.value) {
isTextInputMode.value = true;
}
// if (!isPhoneCallMode.value && !isPushToTalkActive.value) {
// Logger.i(TAG, '切换文本输入模式');
// isTextInputMode.value = false;
// }
}
Logger.i(TAG, '识别停止');

2
local_plugins/chat_api/android/src/main/kotlin/com/yunqiinnovation/chat_api/ChatApiService.kt

@ -589,7 +589,7 @@ class ChatApiService(private val context: android.content.Context? = null) : Cor
val functionName = firstToolCall.name
val argumentsJson = firstToolCall.arguments
var isError = false
val errorText = ""
var errorText = ""
val result = if (_mcpClient?.hasToolWithName(functionName) == true) {
// 解析参数,如果参数为空JSON对象,使用空Map
val arguments = if (argumentsJson == "{}") {

Loading…
Cancel
Save