Skip to content

fix(vscode): show shell command description in permission approval prompt#10692

Merged
lambertjosh merged 3 commits into
mainfrom
fix/shell-permission-show-description
Jun 2, 2026
Merged

fix(vscode): show shell command description in permission approval prompt#10692
lambertjosh merged 3 commits into
mainfrom
fix/shell-permission-show-description

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

What

When a shell command includes a descriptive title (the description parameter the AI provides — e.g. "Install project dependencies" or "Run all tests"), that description is now shown in the permission/approval dialog alongside the raw command.

Previously, the approval dialog only showed the raw shell command string. The description was only ever used for the tool card in chat (after execution). Users had no way to quickly identify what a command was intended to do before approving it.

Why

The description field already exists in the shell tool's parameter schema and is shown in the chat message after execution. Including it in the pre-execution approval dialog gives users better context when deciding whether to approve a command.

Changes

  • packages/opencode/src/tool/shell.ts: The ask helper now accepts an optional description parameter and includes it in the metadata object passed to ctx.ask(). The call site passes params.description through.
  • packages/kilo-vscode/webview-ui/src/types/messages/permissions.ts: Added description?: string to the args field of PermissionRequest so the type reflects the new metadata field.
  • packages/kilo-vscode/webview-ui/src/components/chat/PermissionDock.tsx: Reads args.description and renders it as a permission-hint element above the raw command block when present.

Built for Joshua Lambert by Kilo for Slack

…ompt

When a shell command has a descriptive title (the  parameter
provided by the AI), include it in the permission approval dialog so users
can identify what the command will do, not just see the raw command string.
Comment thread packages/opencode/src/tool/shell.ts
@kilo-code-bot

kilo-code-bot Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: 2 Suggestions (carried forward) | Recommendation: Merge (suggestions are non-blocking)

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION (carried forward from initial review)

File Line Issue
packages/opencode/src/tool/shell.ts 300 Description (and command) silently dropped for external_directory permission when scan.access === "unknown" (write/destructive commands) — users won't see description in that code path
packages/kilo-vscode/webview-ui/src/components/chat/PermissionDock.tsx 50 cmdDescription is a plain function but follows reactive prop access — fine if permission request is always static; worth a createMemo or a comment if it can change
Latest commit (671340a) — no new issues
  • Visual regression baselines — Updated 4 PNG baselines (bash-with-permission, permission-dock-bash-many-rules, permission-dock-heredoc, permission-dock-subagent). These are auto-generated by Linux CI and contain no code changes. ✅
Files Reviewed (8 files + 4 baseline images)
  • packages/opencode/src/tool/shell.ts — 1 suggestion (carried forward)
  • packages/kilo-vscode/webview-ui/src/components/chat/PermissionDock.tsx — 1 suggestion (carried forward)
  • packages/kilo-vscode/webview-ui/src/types/messages/permissions.ts — no issues
  • packages/kilo-vscode/webview-ui/src/components/chat/PermissionCommand.tsx — no issues
  • packages/kilo-vscode/webview-ui/src/styles/permission-dock.css — no issues
  • packages/kilo-vscode/webview-ui/src/styles/high-contrast.css — no issues
  • packages/kilo-vscode/webview-ui/src/stories/composite.stories.tsx — no issues
  • .changeset/shell-permission-descriptions.md — no issues
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/composite-webview/*.png — auto-generated baseline updates, not reviewed

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 131,450 tokens

Review guidance: REVIEW.md from base branch main

@lambertjosh

Copy link
Copy Markdown
Contributor

Validated it works:
image

@lambertjosh

Copy link
Copy Markdown
Contributor

Made it better

image

@marius-kilocode

Copy link
Copy Markdown
Collaborator
image Would it not make sense to move the scrollbar to the very right? @lambertjosh

@lambertjosh

Copy link
Copy Markdown
Contributor

Would it not make sense to move the scrollbar to the very right? @lambertjosh

The scrollbar is the full height of the command prompt panel itself. that's just the size of the displayed portion vs. the full buffer.

Here it is in light mode:
image

I can remove the grey background of the prompt, but I think it actually provides nicer contrast IMO.

@lambertjosh lambertjosh merged commit 4cf8e53 into main Jun 2, 2026
21 checks passed
@lambertjosh lambertjosh deleted the fix/shell-permission-show-description branch June 2, 2026 17:15
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.

2 participants