feat(apps): 重构 UI 架构为 presentation 层并新增 l10n 国际化支持
This commit is contained in:
@@ -2,10 +2,10 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tool_result.g.dart';
|
||||
|
||||
/// Schema 版本常量
|
||||
/// Default schema version.
|
||||
const _defaultSchemaVersion = 'v1';
|
||||
|
||||
/// 工具执行结果(给 AI 的原始数据)
|
||||
/// Raw tool execution result used by the assistant runtime.
|
||||
@JsonSerializable()
|
||||
class ToolResult {
|
||||
final String? eventId;
|
||||
@@ -20,7 +20,7 @@ class ToolResult {
|
||||
Map<String, dynamic> toJson() => _$ToolResultToJson(this);
|
||||
}
|
||||
|
||||
/// UI 卡片 Schema(给 UI 渲染)
|
||||
/// UI card schema consumed by frontend renderers.
|
||||
@JsonSerializable()
|
||||
class UiCard {
|
||||
@JsonKey(name: 'type')
|
||||
@@ -44,7 +44,7 @@ class UiCard {
|
||||
Map<String, dynamic> toJson() => _$UiCardToJson(this);
|
||||
}
|
||||
|
||||
/// 卡片操作按钮
|
||||
/// Action button metadata for a UI card.
|
||||
@JsonSerializable()
|
||||
class CardAction {
|
||||
final String type;
|
||||
@@ -65,7 +65,7 @@ class CardAction {
|
||||
Map<String, dynamic> toJson() => _$CardActionToJson(this);
|
||||
}
|
||||
|
||||
/// 日历卡片数据
|
||||
/// Calendar card payload data.
|
||||
@JsonSerializable()
|
||||
class CalendarCardData {
|
||||
final String id;
|
||||
|
||||
Reference in New Issue
Block a user