Skip to content

Conversation

@ryanwyler
Copy link
Contributor

@ryanwyler ryanwyler commented Jan 8, 2026

Fixes #7286

Problem

The 'Hide tool details' toggle in the command palette (Ctrl+P) has no effect on the UI - completed tools are always displayed regardless of the setting.

Root Cause

The Permission rework commit 351ddee (merged 2026-01-01, PR #6319) accidentally removed the showDetails check from the ToolPart function when refactoring the tool rendering system.

Before Permission rework (working):

function ToolPart(props: { last: boolean; part: ToolPart; message: AssistantMessage }) {
  const { theme } = useTheme()
  const { showDetails } = use()  // <-- Gets showDetails from context
  const sync = useSync()
  const [margin, setMargin] = createSignal(0)
  const component = createMemo(() => {
    // Hide tool if showDetails is false and tool completed successfully
    // But always show if there's an error or permission is required
    const shouldHide =
      !showDetails() &&
      props.part.state.status === "completed" &&
      !sync.data.permission[props.message.sessionID]?.some((x) => x.callID === props.part.callID)

    if (shouldHide) {
      return undefined  // <-- Returns nothing, hiding the tool
    }
    // ...
  })
}

After Permission rework (broken):

function ToolPart(props: { last: boolean; part: ToolPart; message: AssistantMessage }) {
  const sync = useSync()
  // <-- No use() call!
  // <-- No showDetails check!

  const toolprops = { /* ... */ }

  return (
    <Switch>
      // <-- Always renders all tools unconditionally
    </Switch>
  )
}

Fix

Restore the showDetails check by:

  1. Adding const ctx = use() to access the context
  2. Adding a shouldHide memo with the original logic
  3. Wrapping the return in <Show when={!shouldHide()}>

The fix preserves the original behavior:

  • Hide completed tools when showDetails is false
  • Always show tools that are pending/running (so users see progress)
  • Always show tools that require permission (so users can respond)

The fix uses the same permission data structure (x.tool?.callID) as the existing code, aligning with the new permission system introduced in the rework.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node
Copy link
Collaborator

/review

Comment on lines 1332 to 1335
const shouldHide = createMemo(() => {
if (ctx.showDetails()) return false
if (props.part.state.status !== "completed") return false
const permissions = sync.data.permission[props.message.sessionID] ?? []
if (permissions.some((x) => x.tool?.callID === props.part.callID)) return false
return true
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait i dont think this part makes sense anymore w/ new dialog changes for permissions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Updated and pushed.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

lgtm

## Problem

The 'Hide tool details' toggle in the command palette (Ctrl+P) has no
effect on the UI - completed tools are always displayed regardless of
the setting.

## Root Cause

The Permission rework commit 351ddee (merged 2026-01-01, PR anomalyco#6319)
accidentally removed the showDetails check from the ToolPart function.

## Fix

Restore the showDetails check with simplified logic:
- Show all tools when showDetails is true
- Show running/pending tools (so users see progress)
- Hide completed tools when showDetails is false

Removed the permission-based visibility check as the new PermissionPrompt
dialog handles permissions separately at the bottom of the screen.
@ryanwyler ryanwyler force-pushed the fix/restore-show-details-check branch from 52d607c to 9becced Compare January 8, 2026 05:33
@ariane-emory
Copy link
Contributor

This does seem like it works to me. Fingers crossed that we'll see it merged soon - I (and probably others, I'd guess) do frequently use this feature, so I'd love to see its functionality restored.

@rekram1-node rekram1-node merged commit eacf3ad into anomalyco:dev Jan 8, 2026
3 checks passed
aryasaatvik pushed a commit to aryasaatvik/opencode that referenced this pull request Jan 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regression: tool_details / "Hide tool details" no longer working.

3 participants