[bugfix] chat bubble error and Pronounce ID.UNYX error

This commit is contained in:
2025-08-18 13:34:57 +08:00
parent f2ffaf6f70
commit 028471a2b7
6 changed files with 52 additions and 36 deletions

View File

@@ -36,6 +36,15 @@ class MessageService extends ChangeNotifier {
replaceMessage(id: _latestUserMessageId!, text: call.arguments);
break;
case "onAsrStop":
int index = findMessageIndexById(_latestUserMessageId!);
if (index == -1) {
return;
}
final message = _messages[index];
if (message.text.isEmpty) {
removeMessageById(_latestUserMessageId!);
return;
}
replaceMessage(
id: _latestUserMessageId!, status: MessageStatus.normal);
if (_asrCompleter != null && !_asrCompleter!.isCompleted) {