diff --git a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx index 659892b17f7..4d0f6439309 100644 --- a/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/routes/session/index.tsx @@ -1324,8 +1324,16 @@ function TextPart(props: { last: boolean; part: TextPart; message: AssistantMess // Pending messages moved to individual tool pending functions function ToolPart(props: { last: boolean; part: ToolPart; message: AssistantMessage }) { + const ctx = use() const sync = useSync() + // Hide tool if showDetails is false and tool completed successfully + const shouldHide = createMemo(() => { + if (ctx.showDetails()) return false + if (props.part.state.status !== "completed") return false + return true + }) + const toolprops = { get metadata() { return props.part.state.status === "pending" ? {} : (props.part.state.metadata ?? {}) @@ -1350,53 +1358,55 @@ function ToolPart(props: { last: boolean; part: ToolPart; message: AssistantMess } return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) }