feat: AI Agent 处理器扩展 + 服药打卡确认链路 + AI 气泡配色微调 + 数据刷新 providers 抽离 + 多端页面细节调整
This commit is contained in:
@@ -420,6 +420,8 @@ class ChatMessagesView extends ConsumerWidget {
|
||||
) {
|
||||
final meta = msg.metadata ?? <String, dynamic>{};
|
||||
final backendType = meta['type'] as String? ?? '';
|
||||
final medicationOperation = meta['operation']?.toString() ?? 'create';
|
||||
final isMedicationCheckIn = medicationOperation == 'confirm';
|
||||
final screenWidth = MediaQuery.sizeOf(context).width;
|
||||
|
||||
// 识别是哪种数据类型
|
||||
@@ -449,7 +451,7 @@ class ChatMessagesView extends ConsumerWidget {
|
||||
|
||||
if (isMedication) {
|
||||
// 药品录入 — 主展示区已显示药名+剂量,详情只列额外信息
|
||||
title = '药品录入确认';
|
||||
title = isMedicationCheckIn ? '服药打卡确认' : '药品录入确认';
|
||||
titleIcon = Icons.medication_liquid_outlined;
|
||||
mainLabel = meta['name'] as String? ?? '';
|
||||
mainValue = meta['dosage'] as String? ?? '';
|
||||
@@ -834,7 +836,9 @@ class ChatMessagesView extends ConsumerWidget {
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
msg.isReadOnly ? '历史记录' : '录入成功',
|
||||
msg.isReadOnly
|
||||
? '历史记录'
|
||||
: (isMedicationCheckIn ? '打卡成功' : '录入成功'),
|
||||
style: const TextStyle(
|
||||
fontSize: 19,
|
||||
fontWeight: FontWeight.w700,
|
||||
@@ -882,9 +886,9 @@ class ChatMessagesView extends ConsumerWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const Text(
|
||||
'确认录入',
|
||||
style: TextStyle(
|
||||
Text(
|
||||
isMedicationCheckIn ? '确认打卡' : '确认录入',
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textPrimary,
|
||||
@@ -1005,7 +1009,7 @@ class ChatMessagesView extends ConsumerWidget {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: isUser ? const Color(0xFF5F56FF) : const Color(0xFFF8F8FF),
|
||||
color: isUser ? const Color(0xFF5F56FF) : const Color(0xFFFAFAFF),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(isUser ? 18.6 : 3),
|
||||
topRight: Radius.circular(isUser ? 3 : 18.6),
|
||||
|
||||
Reference in New Issue
Block a user