fix: 修复 Flutter 前端多项功能 + 后端运动计划 API
- Android 添加相机/存储权限,拍照和相册功能可用 - AI 回复支持 Markdown 渲染(加粗/表格不再显示**乱码) - 附件按钮接线,支持拍照/相册/文件选择 - 智能体面板按钮全部接线(拍照/上传/手动录入/导航) - 侧边栏 AI 录入后自动刷新健康数据 - 运动计划页增加创建按钮 + 打卡功能 - 后端运动计划支持 AI 创建和打卡(Tool Calling) - 修复 CreateExercisePlanRequest JSON 反序列化
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import '../../../providers/chat_provider.dart';
|
||||
|
||||
@@ -56,10 +57,17 @@ class ChatMessagesView extends ConsumerWidget {
|
||||
children: [
|
||||
if (!isUser && chatState.isStreaming && msg.content.isEmpty)
|
||||
_buildThinkingIndicator()
|
||||
else if (isUser)
|
||||
Text(msg.content, style: const TextStyle(fontSize: 16, color: Colors.white))
|
||||
else
|
||||
Text(
|
||||
msg.content.isEmpty && !isUser ? '...' : msg.content,
|
||||
style: TextStyle(fontSize: 16, color: isUser ? Colors.white : const Color(0xFF1A1A1A)),
|
||||
MarkdownBody(
|
||||
data: msg.content.isEmpty ? '...' : msg.content,
|
||||
selectable: true,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
p: const TextStyle(fontSize: 16, color: Color(0xFF1A1A1A)),
|
||||
h1: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
code: TextStyle(fontSize: 14, backgroundColor: Colors.grey[200]),
|
||||
),
|
||||
),
|
||||
if (!isUser && msg.content.isNotEmpty && !chatState.isStreaming)
|
||||
Padding(
|
||||
|
||||
Reference in New Issue
Block a user