将同步的文件读取、代码解析和分块操作改为异步实现,使用 asyncio.to_thread 将 CPU 密集型操作放到线程池执行,避免阻塞事件循环。主要修改包括: - 在 TreeSitterParser 和 CodeSplitter 中添加异步解析方法 - 修改 CodeIndexer 使用异步文件读取和分块 - 为 FileReadTool 和 FileSearchTool 添加异步文件读取支持 |
||
|---|---|---|
| .. | ||
| agent | ||
| llm | ||
| rag | ||
| init_templates.py | ||
| report_generator.py | ||
| scanner.py | ||
| zip_storage.py | ||