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":
|
if tool_name == "research_topic":
|
||||||
topic = arguments.get("topic", "")
|
topic = arguments.get("topic", "")
|
||||||
try:
|
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 = {
|
result = {
|
||||||
"success": True,
|
"success": True,
|
||||||
"type": "research_note",
|
"type": "research_note",
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ async def run_research_pipeline(
|
|||||||
user_id: int,
|
user_id: int,
|
||||||
model: str,
|
model: str,
|
||||||
buf=None,
|
buf=None,
|
||||||
|
project_id: int | None = None,
|
||||||
) -> Note:
|
) -> Note:
|
||||||
"""Full research pipeline: search → fetch → synthesize → create note.
|
"""Full research pipeline: search → fetch → synthesize → create note.
|
||||||
|
|
||||||
@@ -112,6 +113,7 @@ async def run_research_pipeline(
|
|||||||
title=title,
|
title=title,
|
||||||
body=body,
|
body=body,
|
||||||
tags=["research"],
|
tags=["research"],
|
||||||
|
project_id=project_id,
|
||||||
)
|
)
|
||||||
logger.info("Research: created note id=%d title='%s'", note.id, note.title)
|
logger.info("Research: created note id=%d title='%s'", note.id, note.title)
|
||||||
return note
|
return note
|
||||||
|
|||||||
Reference in New Issue
Block a user