This commit is contained in:
@@ -15,12 +15,219 @@ final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ThinkingStep {
|
||||
String get id => throw _privateConstructorUsedError;
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
ThinkingStepStatus get status => throw _privateConstructorUsedError;
|
||||
String? get details => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of ThinkingStep
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ThinkingStepCopyWith<ThinkingStep> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ThinkingStepCopyWith<$Res> {
|
||||
factory $ThinkingStepCopyWith(
|
||||
ThinkingStep value,
|
||||
$Res Function(ThinkingStep) then,
|
||||
) = _$ThinkingStepCopyWithImpl<$Res, ThinkingStep>;
|
||||
@useResult
|
||||
$Res call({
|
||||
String id,
|
||||
String title,
|
||||
ThinkingStepStatus status,
|
||||
String? details,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ThinkingStepCopyWithImpl<$Res, $Val extends ThinkingStep>
|
||||
implements $ThinkingStepCopyWith<$Res> {
|
||||
_$ThinkingStepCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of ThinkingStep
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? title = null,
|
||||
Object? status = null,
|
||||
Object? details = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title: null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
status: null == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as ThinkingStepStatus,
|
||||
details: freezed == details
|
||||
? _value.details
|
||||
: details // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ThinkingStepImplCopyWith<$Res>
|
||||
implements $ThinkingStepCopyWith<$Res> {
|
||||
factory _$$ThinkingStepImplCopyWith(
|
||||
_$ThinkingStepImpl value,
|
||||
$Res Function(_$ThinkingStepImpl) then,
|
||||
) = __$$ThinkingStepImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
String id,
|
||||
String title,
|
||||
ThinkingStepStatus status,
|
||||
String? details,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ThinkingStepImplCopyWithImpl<$Res>
|
||||
extends _$ThinkingStepCopyWithImpl<$Res, _$ThinkingStepImpl>
|
||||
implements _$$ThinkingStepImplCopyWith<$Res> {
|
||||
__$$ThinkingStepImplCopyWithImpl(
|
||||
_$ThinkingStepImpl _value,
|
||||
$Res Function(_$ThinkingStepImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ThinkingStep
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? title = null,
|
||||
Object? status = null,
|
||||
Object? details = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$ThinkingStepImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
title: null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
status: null == status
|
||||
? _value.status
|
||||
: status // ignore: cast_nullable_to_non_nullable
|
||||
as ThinkingStepStatus,
|
||||
details: freezed == details
|
||||
? _value.details
|
||||
: details // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ThinkingStepImpl implements _ThinkingStep {
|
||||
const _$ThinkingStepImpl({
|
||||
required this.id,
|
||||
required this.title,
|
||||
this.status = ThinkingStepStatus.running,
|
||||
this.details,
|
||||
});
|
||||
|
||||
@override
|
||||
final String id;
|
||||
@override
|
||||
final String title;
|
||||
@override
|
||||
@JsonKey()
|
||||
final ThinkingStepStatus status;
|
||||
@override
|
||||
final String? details;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ThinkingStep(id: $id, title: $title, status: $status, details: $details)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ThinkingStepImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.status, status) || other.status == status) &&
|
||||
(identical(other.details, details) || other.details == details));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, title, status, details);
|
||||
|
||||
/// Create a copy of ThinkingStep
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ThinkingStepImplCopyWith<_$ThinkingStepImpl> get copyWith =>
|
||||
__$$ThinkingStepImplCopyWithImpl<_$ThinkingStepImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _ThinkingStep implements ThinkingStep {
|
||||
const factory _ThinkingStep({
|
||||
required final String id,
|
||||
required final String title,
|
||||
final ThinkingStepStatus status,
|
||||
final String? details,
|
||||
}) = _$ThinkingStepImpl;
|
||||
|
||||
@override
|
||||
String get id;
|
||||
@override
|
||||
String get title;
|
||||
@override
|
||||
ThinkingStepStatus get status;
|
||||
@override
|
||||
String? get details;
|
||||
|
||||
/// Create a copy of ThinkingStep
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ThinkingStepImplCopyWith<_$ThinkingStepImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ChatState {
|
||||
List<ChatSessionEntity> get sessions => throw _privateConstructorUsedError;
|
||||
ChatSessionEntity? get activeSession => throw _privateConstructorUsedError;
|
||||
List<ChatMessageEntity> get messages => throw _privateConstructorUsedError;
|
||||
bool get isTyping => throw _privateConstructorUsedError;
|
||||
List<ThinkingStep> get thinkingSteps => throw _privateConstructorUsedError;
|
||||
String? get streamingContent => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of ChatState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -39,6 +246,8 @@ abstract class $ChatStateCopyWith<$Res> {
|
||||
ChatSessionEntity? activeSession,
|
||||
List<ChatMessageEntity> messages,
|
||||
bool isTyping,
|
||||
List<ThinkingStep> thinkingSteps,
|
||||
String? streamingContent,
|
||||
});
|
||||
|
||||
$ChatSessionEntityCopyWith<$Res>? get activeSession;
|
||||
@@ -63,6 +272,8 @@ class _$ChatStateCopyWithImpl<$Res, $Val extends ChatState>
|
||||
Object? activeSession = freezed,
|
||||
Object? messages = null,
|
||||
Object? isTyping = null,
|
||||
Object? thinkingSteps = null,
|
||||
Object? streamingContent = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
@@ -82,6 +293,14 @@ class _$ChatStateCopyWithImpl<$Res, $Val extends ChatState>
|
||||
? _value.isTyping
|
||||
: isTyping // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
thinkingSteps: null == thinkingSteps
|
||||
? _value.thinkingSteps
|
||||
: thinkingSteps // ignore: cast_nullable_to_non_nullable
|
||||
as List<ThinkingStep>,
|
||||
streamingContent: freezed == streamingContent
|
||||
? _value.streamingContent
|
||||
: streamingContent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
@@ -116,6 +335,8 @@ abstract class _$$ChatStateImplCopyWith<$Res>
|
||||
ChatSessionEntity? activeSession,
|
||||
List<ChatMessageEntity> messages,
|
||||
bool isTyping,
|
||||
List<ThinkingStep> thinkingSteps,
|
||||
String? streamingContent,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -140,6 +361,8 @@ class __$$ChatStateImplCopyWithImpl<$Res>
|
||||
Object? activeSession = freezed,
|
||||
Object? messages = null,
|
||||
Object? isTyping = null,
|
||||
Object? thinkingSteps = null,
|
||||
Object? streamingContent = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$ChatStateImpl(
|
||||
@@ -159,6 +382,14 @@ class __$$ChatStateImplCopyWithImpl<$Res>
|
||||
? _value.isTyping
|
||||
: isTyping // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
thinkingSteps: null == thinkingSteps
|
||||
? _value._thinkingSteps
|
||||
: thinkingSteps // ignore: cast_nullable_to_non_nullable
|
||||
as List<ThinkingStep>,
|
||||
streamingContent: freezed == streamingContent
|
||||
? _value.streamingContent
|
||||
: streamingContent // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -172,8 +403,11 @@ class _$ChatStateImpl implements _ChatState {
|
||||
this.activeSession,
|
||||
final List<ChatMessageEntity> messages = const [],
|
||||
this.isTyping = false,
|
||||
final List<ThinkingStep> thinkingSteps = const [],
|
||||
this.streamingContent,
|
||||
}) : _sessions = sessions,
|
||||
_messages = messages;
|
||||
_messages = messages,
|
||||
_thinkingSteps = thinkingSteps;
|
||||
|
||||
final List<ChatSessionEntity> _sessions;
|
||||
@override
|
||||
@@ -198,10 +432,21 @@ class _$ChatStateImpl implements _ChatState {
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool isTyping;
|
||||
final List<ThinkingStep> _thinkingSteps;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<ThinkingStep> get thinkingSteps {
|
||||
if (_thinkingSteps is EqualUnmodifiableListView) return _thinkingSteps;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_thinkingSteps);
|
||||
}
|
||||
|
||||
@override
|
||||
final String? streamingContent;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ChatState(sessions: $sessions, activeSession: $activeSession, messages: $messages, isTyping: $isTyping)';
|
||||
return 'ChatState(sessions: $sessions, activeSession: $activeSession, messages: $messages, isTyping: $isTyping, thinkingSteps: $thinkingSteps, streamingContent: $streamingContent)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -214,7 +459,13 @@ class _$ChatStateImpl implements _ChatState {
|
||||
other.activeSession == activeSession) &&
|
||||
const DeepCollectionEquality().equals(other._messages, _messages) &&
|
||||
(identical(other.isTyping, isTyping) ||
|
||||
other.isTyping == isTyping));
|
||||
other.isTyping == isTyping) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._thinkingSteps,
|
||||
_thinkingSteps,
|
||||
) &&
|
||||
(identical(other.streamingContent, streamingContent) ||
|
||||
other.streamingContent == streamingContent));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -224,6 +475,8 @@ class _$ChatStateImpl implements _ChatState {
|
||||
activeSession,
|
||||
const DeepCollectionEquality().hash(_messages),
|
||||
isTyping,
|
||||
const DeepCollectionEquality().hash(_thinkingSteps),
|
||||
streamingContent,
|
||||
);
|
||||
|
||||
/// Create a copy of ChatState
|
||||
@@ -241,6 +494,8 @@ abstract class _ChatState implements ChatState {
|
||||
final ChatSessionEntity? activeSession,
|
||||
final List<ChatMessageEntity> messages,
|
||||
final bool isTyping,
|
||||
final List<ThinkingStep> thinkingSteps,
|
||||
final String? streamingContent,
|
||||
}) = _$ChatStateImpl;
|
||||
|
||||
@override
|
||||
@@ -251,6 +506,10 @@ abstract class _ChatState implements ChatState {
|
||||
List<ChatMessageEntity> get messages;
|
||||
@override
|
||||
bool get isTyping;
|
||||
@override
|
||||
List<ThinkingStep> get thinkingSteps;
|
||||
@override
|
||||
String? get streamingContent;
|
||||
|
||||
/// Create a copy of ChatState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
Reference in New Issue
Block a user