Files
trainhub-flutter/lib/presentation/chat/chat_state.dart
Kazimierz Ciołek 9dcc4b87de
Some checks failed
Build Linux App / build (push) Failing after 1m18s
Next refactors
2026-02-24 02:19:28 +01:00

30 lines
892 B
Dart

import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:trainhub_flutter/domain/entities/chat_session.dart';
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({
@Default([]) List<ChatSessionEntity> sessions,
ChatSessionEntity? activeSession,
@Default([]) List<ChatMessageEntity> messages,
@Default(false) bool isTyping,
@Default([]) List<ThinkingStep> thinkingSteps,
String? streamingContent,
}) = _ChatState;
}