feat: AI 对话附件上下文解析 + 历史会话归档 + 多页面 UI 重构

- 后端: 新增 AttachmentContextBuilder 解析图片/PDF 摘要并拼入 LLM 上下文; ai_chat_endpoints 扩展附件接口; 新增 ReportAnalysisService
- 前端: 新增历史会话页与 conversation_history_provider; chat 链路支持附件展示与回放
- UI: 重构 medication_checkin / notification_center / profile / health_drawer 等多页面
- 配置: api_client baseUrl 适配当前 WiFi IP
This commit is contained in:
MingNian
2026-07-06 12:44:59 +08:00
parent 4507083f3f
commit 7a93237069
38 changed files with 4165 additions and 1157 deletions

View File

@@ -393,16 +393,32 @@ class _DeviceResultTile extends StatelessWidget {
final type = HealthBleService.deviceTypeFromScan(result);
final name = _deviceNameOf(result, type);
return Container(
padding: const EdgeInsets.all(14),
padding: const EdgeInsets.all(15),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: AppColors.borderLight),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppColors.border, width: 1.1),
boxShadow: [AppTheme.shadowLight],
),
child: Row(
children: [
Icon(type?.icon ?? Icons.bluetooth_rounded, color: AppColors.primary),
const SizedBox(width: 12),
Container(
width: 48,
height: 48,
decoration: BoxDecoration(
color: AppColors.primary.withValues(alpha: 0.10),
borderRadius: BorderRadius.circular(14),
border: Border.all(
color: AppColors.primary.withValues(alpha: 0.10),
),
),
child: Icon(
type?.icon ?? Icons.bluetooth_rounded,
color: AppColors.primary,
size: 25,
),
),
const SizedBox(width: 14),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -410,27 +426,41 @@ class _DeviceResultTile extends StatelessWidget {
Text(
type?.label ?? '健康设备',
style: const TextStyle(
fontSize: 15,
fontSize: 18,
fontWeight: FontWeight.w800,
color: AppColors.textPrimary,
),
),
const SizedBox(height: 3),
const SizedBox(height: 4),
Text(
name,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontSize: 12,
fontSize: 14,
color: AppColors.textHint,
),
),
],
),
),
FilledButton(
onPressed: connecting ? null : onConnect,
child: Text(connecting ? '连接中' : '连接'),
const SizedBox(width: 10),
SizedBox(
height: 38,
child: FilledButton(
onPressed: connecting ? null : onConnect,
style: FilledButton.styleFrom(
padding: const EdgeInsets.symmetric(horizontal: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
textStyle: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w800,
),
),
child: Text(connecting ? '连接中' : '连接'),
),
),
],
),