Files
iiEsaywebUIapp/lib/features/chat/providers/assistant_response_builder_provider.dart
cogwheel0 7debb7a055 chore: update markdown dependency and refactor streaming handling
- Added `markdown` dependency version `^7.2.1` in `pubspec.yaml`.
- Updated `pubspec.lock` to reflect the direct dependency change.
- Refactored `streaming_helper.dart` to utilize `StreamingResponseController` for better stream management.
- Enhanced `ChatMessagesNotifier` to handle message streams with improved formatting and error handling.
- Updated `StreamingMarkdownWidget` to streamline markdown rendering and support new configurations.
2025-09-30 20:49:02 +05:30

26 lines
669 B
Dart

import 'package:flutter/widgets.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../core/models/chat_message.dart';
typedef AssistantResponseBuilder =
Widget Function(BuildContext context, AssistantResponseContext response);
class AssistantResponseContext {
const AssistantResponseContext({
required this.message,
required this.markdown,
required this.isStreaming,
required this.buildDefault,
});
final ChatMessage message;
final String markdown;
final bool isStreaming;
final WidgetBuilder buildDefault;
}
final assistantResponseBuilderProvider = Provider<AssistantResponseBuilder?>(
(_) => null,
);