This commit is contained in:
@@ -4,6 +4,18 @@ import 'package:trainhub_flutter/domain/entities/chat_message.dart';
|
||||
|
||||
part 'chat_state.freezed.dart';
|
||||
|
||||
enum ThinkingStepStatus { pending, running, completed, error }
|
||||
|
||||
@freezed
|
||||
class ThinkingStep with _$ThinkingStep {
|
||||
const factory ThinkingStep({
|
||||
required String id,
|
||||
required String title,
|
||||
@Default(ThinkingStepStatus.running) ThinkingStepStatus status,
|
||||
String? details,
|
||||
}) = _ThinkingStep;
|
||||
}
|
||||
|
||||
@freezed
|
||||
class ChatState with _$ChatState {
|
||||
const factory ChatState({
|
||||
@@ -11,5 +23,7 @@ class ChatState with _$ChatState {
|
||||
ChatSessionEntity? activeSession,
|
||||
@Default([]) List<ChatMessageEntity> messages,
|
||||
@Default(false) bool isTyping,
|
||||
@Default([]) List<ThinkingStep> thinkingSteps,
|
||||
String? streamingContent,
|
||||
}) = _ChatState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user