-
Notifications
You must be signed in to change notification settings - Fork 5k
fix(tui): restore showDetails check removed in Permission rework #7285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tui): restore showDetails check removed in Permission rework #7285
Conversation
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
|
/review |
| 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 | ||
| }) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
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.
52d607c to
9becced
Compare
|
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. |
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
showDetailscheck from theToolPartfunction when refactoring the tool rendering system.Before Permission rework (working):
After Permission rework (broken):
Fix
Restore the showDetails check by:
const ctx = use()to access the contextshouldHidememo with the original logic<Show when={!shouldHide()}>The fix preserves the original behavior:
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.