fix(chat): fix ChatBloc event callback and test reliability
- Fix onEvent callback initialization in ChatBloc constructor - Add MockAgUiService to isolate test from mock API behavior - Remove unnecessary non-null assertions in tests
This commit is contained in:
@@ -2,6 +2,9 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tool_result.g.dart';
|
||||
|
||||
/// Schema 版本常量
|
||||
const _defaultSchemaVersion = 'v1';
|
||||
|
||||
/// 工具执行结果(给 AI 的原始数据)
|
||||
@JsonSerializable()
|
||||
class ToolResult {
|
||||
@@ -31,7 +34,7 @@ class UiCard {
|
||||
|
||||
UiCard({
|
||||
required this.cardType,
|
||||
this.schemaVersion = 'v1',
|
||||
this.schemaVersion = _defaultSchemaVersion,
|
||||
required this.data,
|
||||
this.actions,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user