Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,7 @@ function BlockTool(props: {
onClick?: () => void
part?: ToolPart
spinner?: boolean
borderColor?: RGBA
}) {
const { theme } = useTheme()
const renderer = useRenderer()
Expand All @@ -1698,7 +1699,7 @@ function BlockTool(props: {
gap={1}
backgroundColor={hover() ? theme.backgroundMenu : theme.backgroundPanel}
customBorderChars={SplitBorder.customBorderChars}
borderColor={theme.background}
borderColor={props.borderColor ?? theme.background}
onMouseOver={() => props.onClick && setHover(true)}
onMouseOut={() => setHover(false)}
onMouseUp={() => {
Expand Down Expand Up @@ -1934,6 +1935,12 @@ function Task(props: ToolProps<typeof TaskTool>) {
const current = createMemo(() => tools().findLast((x) => x.state.status !== "pending"))

const isRunning = createMemo(() => props.part.state.status === "running")
const color = createMemo(() => {
const name = props.input.subagent_type
if (!name) return
if (!sync.data.agent.some((x) => x.name === name && !x.hidden)) return
return local.agent.color(name)
})

return (
<Switch>
Expand All @@ -1947,6 +1954,7 @@ function Task(props: ToolProps<typeof TaskTool>) {
}
part={props.part}
spinner={isRunning()}
borderColor={color()}
>
<box>
<text style={{ fg: theme.textMuted }}>
Expand Down
Loading