feat(ai): Agent Tool 扩展 — QueryPatientProfile + DisplayHint 新增 3 变体

- QueryPatientProfileTool: 查询患者档案摘要(年龄/性别/慢性病/用药/家族史)
- DisplayHint 新增 TrendChart/InsightCard/PatientProfile 变体
- 沙箱: Patient + MedicalStaff 添加 query_patient_profile
This commit is contained in:
iven
2026-05-19 10:41:29 +08:00
parent 8b88cb4a50
commit 7edf1ed1d3
5 changed files with 127 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ use serde::{Deserialize, Serialize};
use crate::agent::orchestrator::AgentRunParams;
use crate::agent::sandbox::{get_sandbox_config, resolve_role};
use crate::agent::tool::ToolContext;
use crate::agent::tools::QueryPatientProfileTool;
use crate::agent::tools::QueryPatientVitalsTool;
use crate::agent::tools::SearchMedicalKnowledgeTool;
use crate::agent::tools::{QueryAppointmentsTool, QueryLabReportsTool, QueryMedicationsTool};
@@ -123,6 +124,7 @@ where
registry.register(std::sync::Arc::new(QueryAppointmentsTool));
registry.register(std::sync::Arc::new(QueryMedicationsTool));
registry.register(std::sync::Arc::new(SearchMedicalKnowledgeTool));
registry.register(std::sync::Arc::new(QueryPatientProfileTool));
// 根据用户角色获取沙箱配置
let user_role = resolve_role(&ctx.roles);