allowed_directories in permissions.config is never loaded
オープン
まだ誰も着手していません。
area:configuration
area:permissions
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the bug
I have several directories listed in my permissions-config for various workspaces. They are never loaded. I can run /list-dirs and never see them.
{
"locations": {
"/workspaces/cbreymdev": {
"allowed_directories": [
"/opt/test",
"/tmp"
]
},
...
still results in:
Allowed directories for file access:
1. /workspaces/cbreymdev
2. /tmp
3. /home/vscode/.copilot/installed-plugins
Affected version
1.0.79-6
Steps to reproduce the behavior
sudo mkdir /opt/testsudo chmod a+rwx /opt/testmkdir /opt/test/workspacemkdir /opt/test/subjectecho "Can you read me?" > /opt/test/subject/file.txtjq '.locations += {"/opt/test/workspace": { "allowed_directories": [ "/opt/test/subject"] }}' ~/.copilot/permissions-config.json > /tmp/permissions-config.jsoncp /tmp/permissions-config.json ~/.copilot/permissions-config.jsoncd /opt/test/workspace- run
copilotinteractively - prompt
/list-dirs. Observe that "/opt/test/subject" is not present. - prompt "What does /opt/test/subject/file.txt" contain?. Observe a permission prompt.
Expected behavior
In step 10, the listing should container /opt/test/subject.
In step 11, it should report the contents of /opt/test/subject/file.txt
Additional context
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、CLI の起動時に ~/.copilot/permissions-config.json がどのように読み込まれるかを追跡し、次に /list-dirs で使用されるデータを追います。提供された jq 設定と workspace の手順で問題を再現します。完了の条件は、アクティブな場所の allowed_directories が /list-dirs に表示され、追加の権限プロンプトなしで一覧にあるファイルを読み取れることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- shell
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 65/100