This commit is contained in:
Team3
2026-07-04 21:27:47 +02:00
parent c05421a8c1
commit 2d9ca00b47
3 changed files with 71 additions and 9 deletions

View File

@@ -209,6 +209,10 @@ async def _research_once(ctx: GenContext, flow: Flow, q: dict, folder, instructi
work_dir = flow.work_dir
caps = "files" if folder else "full"
p = work_dir / f"research-{tag}.md"
mp = None
if folder is None: # thema: Fundstellen als Material für die Inline-Folgeschritte sichern
(work_dir / "material").mkdir(parents=True, exist_ok=True)
mp = work_dir / "material" / f"research-{tag}.txt"
stop = asyncio.Event()
buf: list[str] = [] # assistant text streamed live from the JSON events
@@ -237,7 +241,7 @@ async def _research_once(ctx: GenContext, flow: Flow, q: dict, folder, instructi
await run_single_slot(
ctx, f"Research {tag}", key=f"blocks-{ctx.topic}-research-{tag}",
prompt=_build_research_prompt(ctx.topic, p, instructions, q["type"], folder,
fokus=fokus, section=section),
fokus=fokus, section=section, material_path=mp),
role="quick", capabilities=caps,
payload=(lambda result, p=p: _file_payload(p)),
timeout=RESEARCH_RUNTIME, on_line=_on_line,