Associate research_topic notes with workspace project
run_research_pipeline now accepts project_id; generation_task.py passes workspace_project_id when the tool is called from a workspace context. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user