mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-13 07:11:55 +00:00
fix(ui): label background task cards
This commit is contained in:
parent
971c837ad4
commit
7970130720
2 changed files with 6 additions and 4 deletions
|
|
@ -2000,7 +2000,8 @@ function Task(props: ToolProps<typeof TaskTool>) {
|
|||
|
||||
const content = createMemo(() => {
|
||||
if (!props.input.description) return ""
|
||||
let content = [`${Locale.titlecase(props.input.subagent_type ?? "General")} Task — ${props.input.description}`]
|
||||
const description = props.metadata.background === true ? `${props.input.description} (background)` : props.input.description
|
||||
let content = [`${Locale.titlecase(props.input.subagent_type ?? "General")} Task — ${description}`]
|
||||
|
||||
if (isRunning() && tools().length > 0) {
|
||||
// content[0] += ` · ${tools().length} toolcalls`
|
||||
|
|
|
|||
|
|
@ -1751,9 +1751,10 @@ 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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue