File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,20 +170,25 @@ def trigger_indexing(
170170 """Trigger indexing via the MCP indexer server."""
171171 print (f"Triggering indexing for { repo_path } " )
172172
173- # Build Python command to call qdrant_index_root via MCP server
173+ # Build Python command to call qdrant_index via MCP server
174+ # Use qdrant_index with subdir parameter to index specific repo
174175 python_cmd = f"""
175176import sys
176177sys.path.insert(0, '/app')
177- from scripts.mcp_indexer_server import qdrant_index_root
178+ from scripts.mcp_indexer_server import qdrant_index
178179import asyncio
179180import json
180- import os
181181
182- # Set working directory to the uploaded repo
183- os.chdir('{ repo_path } ')
182+ # Extract subdir from repo_path (e.g., /work/test-repo -> test-repo)
183+ repo_path = '{ repo_path } '
184+ if repo_path.startswith('/work/'):
185+ subdir = repo_path[6:] # Remove '/work/' prefix
186+ else:
187+ subdir = repo_path
184188
185189# Call indexing
186- result = asyncio.run(qdrant_index_root(
190+ result = asyncio.run(qdrant_index(
191+ subdir=subdir,
187192 recreate={ str (recreate )} ,
188193 collection={ repr (collection ) if collection else 'None' }
189194))
You can’t perform that action at this time.
0 commit comments