MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / load_roles_meta

Function load_roles_meta

agents/profile-report-agent/main.py:647–656  ·  view source on GitHub ↗

加载角色元数据

()

Source from the content-addressed store, hash-verified

645
646def load_roles_meta() -> Dict[str, Any]:
647 """加载角色元数据"""
648 role_meta_file = os.path.join(
649 os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),
650 "data", "roles.json"
651 )
652 if os.path.exists(role_meta_file):
653 with open(role_meta_file, 'r', encoding='utf-8') as f:
654 return json.load(f)
655 return {"roles": {}, "current_role": None}
656
657
658def get_role_chat_id(role_name: str) -> Optional[str]:
659 """获取角色的飞书聊天 ID"""

Callers 3

get_role_chat_idFunction · 0.70
get_role_name_by_user_idFunction · 0.70
main.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected