docs: 添加 AG-UI 协议规则约束到 apps/AGENTS.md
This commit is contained in:
@@ -12,12 +12,16 @@ class ChatState {
|
||||
final bool isLoading;
|
||||
final String? currentMessageId;
|
||||
final String? error;
|
||||
final DateTime? oldestLoadedDate;
|
||||
final bool hasEarlierHistory;
|
||||
|
||||
const ChatState({
|
||||
this.items = const [],
|
||||
this.isLoading = false,
|
||||
this.currentMessageId,
|
||||
this.error,
|
||||
this.oldestLoadedDate,
|
||||
this.hasEarlierHistory = false,
|
||||
});
|
||||
|
||||
static const _unset = Object();
|
||||
@@ -27,6 +31,8 @@ class ChatState {
|
||||
bool? isLoading,
|
||||
Object? currentMessageId = _unset,
|
||||
Object? error = _unset,
|
||||
Object? oldestLoadedDate = _unset,
|
||||
bool? hasEarlierHistory,
|
||||
}) {
|
||||
return ChatState(
|
||||
items: items ?? this.items,
|
||||
@@ -35,6 +41,10 @@ class ChatState {
|
||||
? this.currentMessageId
|
||||
: currentMessageId as String?,
|
||||
error: error == _unset ? this.error : error as String?,
|
||||
oldestLoadedDate: oldestLoadedDate == _unset
|
||||
? this.oldestLoadedDate
|
||||
: oldestLoadedDate as DateTime?,
|
||||
hasEarlierHistory: hasEarlierHistory ?? this.hasEarlierHistory,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user