feat: Enhance indexing progress logging with current file details and add new Docker volumes for CI data persistence.

This commit is contained in:
vinland100 2026-01-06 17:05:05 +08:00
parent 99a73c7706
commit 1876649ed3
4 changed files with 14 additions and 5 deletions

View File

@ -813,9 +813,10 @@ async def _initialize_tools(
# 🔥 逐个文件更新进度 (满足用户需求)
if progress.processed_files - last_progress_update >= 1 or progress.processed_files == progress.total_files:
if progress.total_files > 0:
current_file = progress.current_file or "..."
await emit(
f"📝 索引进度: {progress.processed_files}/{progress.total_files} 文件 "
f"({progress.progress_percentage:.0f}%)"
f"({progress.progress_percentage:.0f}%): {current_file}"
)
last_progress_update = progress.processed_files

View File

@ -68,7 +68,7 @@ PR_REVIEW_OUTPUT_FORMAT = """
### [风险等级: 高/中/低/无] <意见标题>
- **文件**: `<文件路径>`
- **意见**: <描述本次PR中存在的问题或说明未发现新增问题>
- **上下文**: <基于仓库上下文说明为什么这值得关注>
- **上下文**: <基于仓库上下文说明为什么这值得关注未发现问题时无需说明>
- **改进建议**: <如有则提供如无则说明无需进一步改进同时不提供修复建议代码>
```<语言>
<修复建议代码>

View File

@ -373,9 +373,13 @@ class CIService:
directory=repo_path,
update_mode=update_mode
):
# Log progress occasionally
if progress.total_files > 0 and progress.processed_files % 20 == 0:
logger.info(f"[{project.name}] Indexing: {progress.processed_files}/{progress.total_files}")
# Log progress
# For small projects, log every file; for large ones, log every 20 files
should_log = (progress.total_files <= 100) or (progress.processed_files % 20 == 0) or (progress.processed_files == progress.total_files)
if progress.total_files > 0 and should_log:
current_file = progress.current_file or "..."
logger.info(f"[{project.name}] Indexing ({progress.processed_files}/{progress.total_files}): {current_file}")
logger.info(f"✅ Project {project.name} indexing complete.")
return repo_path

View File

@ -40,6 +40,8 @@ services:
- ./backend/app:/app/app:ro # 挂载代码目录,修改后自动生效
- backend_uploads:/app/uploads
- chroma_data:/app/data/vector_db
- ci_workspace:/app/data/ci_workspace
- ci_vectordb:/app/data/ci_vectordb
- /var/run/docker.sock:/var/run/docker.sock # 沙箱执行必须
ports:
- "8000:8000"
@ -125,4 +127,6 @@ volumes:
postgres_data:
backend_uploads:
chroma_data:
ci_workspace:
ci_vectordb:
redis_data: