diff --git a/src/fabledassistant/services/generation_task.py b/src/fabledassistant/services/generation_task.py index 5d22ee6..1d6f869 100644 --- a/src/fabledassistant/services/generation_task.py +++ b/src/fabledassistant/services/generation_task.py @@ -260,7 +260,7 @@ async def run_generation( if tool_name == "research_topic": topic = arguments.get("topic", "") try: - note = await run_research_pipeline(topic, user_id, model, buf) + note = await run_research_pipeline(topic, user_id, model, buf, project_id=workspace_project_id) result = { "success": True, "type": "research_note", diff --git a/src/fabledassistant/services/research.py b/src/fabledassistant/services/research.py index 66bc7c0..0f6233b 100644 --- a/src/fabledassistant/services/research.py +++ b/src/fabledassistant/services/research.py @@ -26,6 +26,7 @@ async def run_research_pipeline( user_id: int, model: str, buf=None, + project_id: int | None = None, ) -> Note: """Full research pipeline: search → fetch → synthesize → create note. @@ -112,6 +113,7 @@ async def run_research_pipeline( title=title, body=body, tags=["research"], + project_id=project_id, ) logger.info("Research: created note id=%d title='%s'", note.id, note.title) return note