-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (21 loc) · 917 Bytes
/
main.py
File metadata and controls
25 lines (21 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from dotenv import load_dotenv
from langchain_text_splitters import Language as SpliterLanguage
from core import VectorStore,create_workflow
load_dotenv()
if __name__ == "__main__":
# 初始化并运行工作流
vector_store = VectorStore(reset=True)
app = create_workflow()
state = app.invoke({
"repo_path":"G:\\AI\\GameFramework-master",
"language":SpliterLanguage.CSHARP}
)
# 打印统计信息
print(f"分析文件数: {len(state.get('file_map', {}))}")
print(f"发现实体数: {len(state.get('entities', []))}")
print(f"建立关系数: {len(state.get('relations', []))}")
if state.get("rst", False):
print("输出文件已生成:")
print("- call_graph.md : Mermaid格式调用图")
print("- graph.html : 交互式可视化图表")
print("- analysis_report.md : AI生成的架构分析报告")