fix(api): home agent falls back to multi-project folder manifest when no project_id

This commit is contained in:
Roberto
2026-05-12 16:54:47 +02:00
parent 7d47ca54be
commit 91e880f9d4

View File

@@ -1418,6 +1418,10 @@ async def run_home_stream(
if project_id:
manifest = await _fetch_project_manifest(project_id)
manifest_block = format_folder_manifest(manifest)
if not manifest_block:
# No specific project context — surface all linked folders so the agent
# can answer questions like "tell me about project X" using its files.
manifest_block = await build_brief_multi_project_manifest()
system_prompt = system_prompt + ("\n\n" + manifest_block if manifest_block else "")
trace_id = _trace_id_from_context(prepared_context)