Browse Source

fix(agent): 移除语音识别时对文本输入模式的强制关闭

避免在语音识别时错误地关闭文本输入模式,保持状态一致性
weicu
lxm 1 year ago
parent
commit
a38da35a14
  1. 4
      lib/modules/agent/controllers/agent_controller.dart

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

@ -498,7 +498,7 @@ class AgentController extends GetxController with WidgetsBindingObserver {
switch (event.type) { switch (event.type) {
case AgentServiceEventType.recognitionStarted: case AgentServiceEventType.recognitionStarted:
isListening.value = true; isListening.value = true;
isTextInputMode.value = false; //isTextInputMode.value = false;
Logger.i(TAG, '订阅代理服务事件识别开始'); Logger.i(TAG, '订阅代理服务事件识别开始');
// isTextInputMode.refresh(); // isTextInputMode.refresh();
// 只标记识别开始,不添加消息 // 只标记识别开始,不添加消息
@ -937,7 +937,7 @@ class AgentController extends GetxController with WidgetsBindingObserver {
// 注意:这里不需要调用startVoiceInput(),因为原生层已经启动了语音识别 // 注意:这里不需要调用startVoiceInput(),因为原生层已经启动了语音识别
// 我们只需要同步Flutter层的状态 // 我们只需要同步Flutter层的状态
isTextInputMode.value = false; //isTextInputMode.value = false;
Logger.i(TAG, 'BLE唤醒状态已设置,等待原生层语音识别结果'); Logger.i(TAG, 'BLE唤醒状态已设置,等待原生层语音识别结果');
} }

Loading…
Cancel
Save