Compare commits

...
+5 -1
View File
@@ -1558,6 +1558,7 @@ export const layer = Layer.effect(
}
const templateParts = yield* resolvePromptParts(template)
const inputFiles = new Set(input.parts?.map((part) => new URL(part.url).pathname))
const isSubtask = (agent.mode === "subagent" && cmd.subtask !== false) || cmd.subtask === true
const parts = isSubtask
? [
@@ -1570,7 +1571,10 @@ export const layer = Layer.effect(
prompt: templateParts.find((y) => y.type === "text")?.text ?? "",
},
]
: [...templateParts, ...(input.parts ?? [])]
: [
...templateParts.filter((part) => part.type !== "file" || !inputFiles.has(new URL(part.url).pathname)),
...(input.parts ?? []),
]
const userAgent = isSubtask ? (input.agent ?? (yield* agents.defaultInfo()).name) : agent.name
const userModel = isSubtask