Add /remove-dir command to revoke directory access
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the feature or problem you'd like to solve
Copilot CLI provides /add-dir and /list-dirs, but no corresponding command to remove a previously allowed directory. Users cannot reduce directory access during a session without restarting or otherwise resetting session state.
Proposed solution
Add /remove-dir <path> as the counterpart to /add-dir. It should:
- Revoke file access to the specified previously allowed directory for the current session.
- Remove the directory from
/list-dirsimmediately. - Unload trusted skills, agents, and instructions loaded from that directory when safe.
- Clearly report active references or running work that prevent immediate removal.
- Return a clear error when the path is not currently allowed.
This improves least-privilege workflows by allowing users to grant temporary access and revoke it as soon as it is no longer needed, without restarting the session.
Example prompts or workflows
-
/add-dir C:\work\shared-library, work with files there, then run/remove-dir C:\work\shared-librarywhen finished. -
Run
/list-dirs, identify an accidentally added directory, and remove it with/remove-dir <path>. -
Temporarily allow access to generated artifacts, inspect them, then revoke access while keeping the current conversation.
-
Attempt to remove a directory used by a running task and receive a clear message explaining what must finish or stop first.
Additional context
A dedicated removal command would make /add-dir reversible and provide a clearer least-privilege permission model. /reset-allowed-tools does not address directory access, and restarting a session is unnecessarily disruptive.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、既存の /add-dir および /list-dirs コマンドのエントリポイントと、現在のセッションのディレクトリ権限がどのように追跡されているかを調べます。要求された動作に基づいて完了条件を定義します。/list-dirs からの削除、ロード済みリソースの安全なアンロード、アクティブな参照または実行中の処理に関する明確な報告、許可されていないパスに対するエラーです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli, security
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100