We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c84ff39 commit edab435Copy full SHA for edab435
1 file changed
src/vectorcode/mcp_main.py
@@ -215,13 +215,14 @@ async def query_tool(
215
configs=query_config,
216
)
217
results: list[str] = []
218
- for path in result_paths:
219
- if os.path.isfile(path):
220
- with open(path) as fin:
221
- rel_path = os.path.relpath(path, config.project_root)
222
- results.append(
223
- f"<path>{rel_path}</path>\n<content>{fin.read()}</content>",
224
- )
+ for result in result_paths:
+ if isinstance(result, str):
+ if os.path.isfile(result):
+ with open(result) as fin:
+ rel_path = os.path.relpath(result, config.project_root)
+ results.append(
+ f"<path>{rel_path}</path>\n<content>{fin.read()}</content>",
225
+ )
226
logger.info("Retrieved the following files: %s", result_paths)
227
return results
228
0 commit comments