mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 22:32:39 +02:00
Wrap delegated tasks in explicit XML context tags.
This commit is contained in:
parent
5148f5dfef
commit
cdb307361a
1 changed files with 9 additions and 2 deletions
|
|
@ -11,5 +11,12 @@ def compose_child_task(task: str, *, curated_context: str | None = None) -> str:
|
|||
"""
|
||||
task = task.strip()
|
||||
if not curated_context or not curated_context.strip():
|
||||
return task
|
||||
return f"{curated_context.strip()}\n\n---\n\nTask:\n{task}"
|
||||
return f"<delegated_task>\n{task}\n</delegated_task>"
|
||||
return (
|
||||
"<delegated_context>\n"
|
||||
f"{curated_context.strip()}\n"
|
||||
"</delegated_context>\n\n"
|
||||
"<delegated_task>\n"
|
||||
f"{task}\n"
|
||||
"</delegated_task>"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue