github / github/copilot-cli

Permission-gate/tool-approval preview truncates full Windows paths

オープン
#4,701 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:permissions area:terminal-rendering
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Describe the bug

When the CLI displays a permission-gate/tool-approval confirmation prompt before running a tool call (e.g., a PowerShell command referencing a file path), the rendered preview shows a truncated version of the path — dropping the leading drive letter and/or earlier path segments (e.g., showing \Users\UserName\ instead of the full C:\Users\UserName\Folder\SubFolder\...) — even though the actual command text passed to the tool contains the complete, correct absolute path.

Affected version

GitHub Copilot CLI 1.0.82

Steps to reproduce the behavior
  1. Start an interactive session with GitHub Copilot CLI on Windows.
  2. Ask the agent to run a PowerShell command that references a full absolute path, e.g.: Get-ChildItem "C:\Users\Username\Folder\SubFolder" -Force
  3. When the permission-gate confirmation dialog appears (asking to approve the tool call), observe the path as rendered in that preview.
  4. Compare against the actual command string — the underlying command is correct and full, but the displayed preview text is partial/truncated.
Expected behavior

The permission-gate preview should render the full, untruncated absolute path exactly as it appears in the command being executed, with no segments dropped.

Additional context
  • CLI version: 1.0.82
  • OS: Windows
  • This is purely a display/rendering issue in the confirmation UI — the command itself executes against the correct full path when approved. Reproduced consistently across multiple tool-call approvals across multiple sessions.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

GitHub Copilot CLI でインタラクティブな Windows セッションを開始し、issue に示されている PowerShell コマンドを使って permission-gate/tool-approval の確認プロンプトを再現します。レンダリングされたプレビューとコマンドの完全なテキストを比較し、絶対パスがどのように表示されるかに注目します。プレビューでドライブ文字全体とパスの各セグメントが切り詰められずに保持されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。