feat: AI 提示词模块化 + AI 同意门控 + AI 草稿存储 + 意图路由 + 医疗引用知识库 + 多页面 UI 优化
- AI 提示词拆分为 markdown 模块(Prompts/global + modules + rag + router) - 新增 AI 同意门控(用户需同意后才能使用 AI 功能) - 新增 AI 录入草稿存储(AiEntryDraftContracts/EfAiEntryDraftStore/AiEntryDraftRecord) - 新增 AI 意图路由(ai_intent_router) - 新增医疗引用知识库(MedicalCitationKnowledge) - 重构 prompt_manager 和 ai_chat_endpoints - 优化聊天/趋势/档案/抽屉/医生端等多个页面 UI - 新增 agent 插画和趋势指标图标资源 - 删除 HANDOFF-2026-07-17.md
This commit is contained in:
@@ -9,7 +9,7 @@ const String baseUrl = String.fromEnvironment(
|
||||
'API_BASE_URL',
|
||||
defaultValue: kReleaseMode
|
||||
? 'https://erpapi.datalumina.cn/xiaomai'
|
||||
: 'http://10.4.178.175:5000',
|
||||
: 'http://192.168.1.34:5000',
|
||||
);
|
||||
|
||||
class ApiException implements Exception {
|
||||
|
||||
@@ -168,3 +168,20 @@ class AppModuleVisuals {
|
||||
|
||||
static AppModuleVisual of(AppModule module) => values[module] ?? ai;
|
||||
}
|
||||
|
||||
/// 健康概览及所有健康指标卡片共用的图标与颜色。
|
||||
class HealthMetricVisuals {
|
||||
HealthMetricVisuals._();
|
||||
|
||||
static const bloodPressureIcon = Icons.bloodtype_outlined;
|
||||
static const heartRateIcon = LucideIcons.heartPulse;
|
||||
static const glucoseIcon = Icons.water_drop_outlined;
|
||||
static const spo2Icon = Icons.air_outlined;
|
||||
static const weightIcon = Icons.monitor_weight_outlined;
|
||||
|
||||
static const bloodPressureColor = Color(0xFF8B5CF6);
|
||||
static const heartRateColor = Color(0xFFF43F5E);
|
||||
static const glucoseColor = Color(0xFFF59E0B);
|
||||
static const spo2Color = Color(0xFF0EA5E9);
|
||||
static const weightColor = Color(0xFF10B981);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import '../pages/consultation/consultation_pages.dart';
|
||||
import '../pages/settings/settings_pages.dart';
|
||||
import '../pages/settings/elder_mode_page.dart';
|
||||
import '../pages/settings/notification_prefs_page.dart';
|
||||
import '../pages/settings/ai_consent_details_page.dart';
|
||||
import '../pages/notifications/notification_center_page.dart';
|
||||
import '../pages/history/conversation_history_page.dart';
|
||||
import '../pages/profile/profile_page.dart';
|
||||
@@ -33,6 +34,7 @@ import '../pages/admin/admin_home_page.dart';
|
||||
import '../pages/admin/admin_add_doctor_page.dart';
|
||||
import '../providers/auth_provider.dart' show userRoleProvider;
|
||||
import '../widgets/app_error_state.dart';
|
||||
import '../widgets/ai_consent_gate.dart';
|
||||
|
||||
Widget _missingParamPage() {
|
||||
return const Scaffold(
|
||||
@@ -53,7 +55,9 @@ Widget buildPage(RouteInfo route, WidgetRef ref) {
|
||||
return const LoginPage();
|
||||
case 'home':
|
||||
final role = ref.watch(userRoleProvider);
|
||||
return role == 'Doctor' ? const DoctorHomePage() : const HomePage();
|
||||
return role == 'Doctor'
|
||||
? const DoctorHomePage()
|
||||
: AiConsentGate(child: const HomePage());
|
||||
case 'doctorHome':
|
||||
return const DoctorHomePage();
|
||||
case 'adminHome':
|
||||
@@ -132,6 +136,8 @@ Widget buildPage(RouteInfo route, WidgetRef ref) {
|
||||
return const ElderModePage();
|
||||
case 'notificationPrefs':
|
||||
return const NotificationPrefsPage();
|
||||
case 'aiConsentDetails':
|
||||
return const AiConsentDetailsPage();
|
||||
case 'notifications':
|
||||
return const NotificationCenterPage();
|
||||
case 'conversationHistory':
|
||||
|
||||
Reference in New Issue
Block a user