Apply PR #24174: feat(core): add background subagent support

This commit is contained in:
opencode-agent[bot] 2026-04-25 17:40:43 +00:00
commit 41851ddeaa
12 changed files with 809 additions and 61 deletions

View file

@ -1756,9 +1756,11 @@ ToolRegistry.register({
const title = createMemo(() => agent().name ?? i18n.t("ui.tool.agent.default"))
const tone = createMemo(() => agent().color)
const subtitle = createMemo(() => {
const value = props.input.description
if (typeof value === "string" && value) return value
return childSessionId()
const value =
typeof props.input.description === "string" && props.input.description ? props.input.description : childSessionId()
if (!value) return value
if (props.metadata.background === true) return `${value} (background)`
return value
})
const running = createMemo(() => props.status === "pending" || props.status === "running")