docs: 添加 AG-UI 协议规则约束到 apps/AGENTS.md

This commit is contained in:
qzl
2026-03-02 11:17:20 +08:00
parent 99d540a18d
commit 87b8727ca4
5 changed files with 279 additions and 1 deletions
@@ -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,
);
}
}