Show an animated assistant bubble before response tokens
This commit is contained in:
@@ -9,6 +9,7 @@ import '../../domain/chat_tool_calls.dart';
|
||||
import 'chat_tool_calls_view.dart';
|
||||
import 'chat_reasoning_chip.dart';
|
||||
import 'native_disclosure.dart';
|
||||
import 'chat_response_pending.dart';
|
||||
|
||||
/// Builds an assistant text part; the default keeps the server's text exactly.
|
||||
typedef ChatMessageTextBuilder = Widget Function(BuildContext, String);
|
||||
@@ -265,6 +266,9 @@ class ChatMessageView extends StatelessWidget {
|
||||
KeyedSubtree(key: _partKey(part, index, seen), child: widget),
|
||||
);
|
||||
}
|
||||
if (widgets.isEmpty && row['streaming'] == true) {
|
||||
widgets.add(const ChatResponsePending());
|
||||
}
|
||||
return widgets;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user