Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

The copilot CLI flashes the permission prompt UI, even though extension has approved.

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

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

評価

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

調査の方向性

示されている onPermissionRequest コールバックを使用して、CLI v1.0.13-1 で権限フローを再現し、承認されたルールと拒否されたルールの両方の応答をテストする。拡張機能の応答からプロンプトまでの CLI の権限シーケンスを追跡する;承認応答によってプロンプトが抑制され、拒否および結果なしの場合の動作が正しければ完了とする。

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

説明

I'm working on an extension that would auto approve based on some rules.

// Deferred fire-and-forget logger — session isn't available until joinSession resolves
let _session = null;
const log = (msg) => { if (_session) _session.log(msg).catch(() => {}); };
...

onPermissionRequest: (request) => {
        const toolName = request.toolName ?? "";
        const toolArgs = {};
        if (request.fullCommandText) toolArgs.command = request.fullCommandText;
        if (request.fileName) toolArgs.path = request.fileName;

        // 1. deny rules first
        for (const rule of parsedDeny) {
            if (matchRule(rule, toolName, toolArgs)) {
                log(`DENY (permission) tool=${toolName} kind=${request.kind} rule="${rule.raw}"`);
                return { kind: "denied-by-rules", rules: [rule.raw] };
            }
        }

        // 2. allow rules — auto-approve
        for (const rule of parsedAllow) {
            if (matchRule(rule, toolName, toolArgs)) {
                log(`APPROVE (permission) tool=${toolName} kind=${request.kind} rule="${rule.raw}"`);
                return { kind: "approved" };
            }
        }

        // 3. no match — let CLI handle (prompt user)
        log(`NO MATCH (permission) tool=${toolName} kind=${request.kind}`);
        return { kind: "no-result" };
    },

In the cli i see the UI prompt none the less, if i do nothing, i see the tool call get approved and complete in the background.
If i'm fast enough or am on autopilot with limited permissions then the ui prompt rejects the tool call and fails it.

I do not think the CLI is correctly sequencing and waiting on extensions for permissions flow.

CLI Version : v1.0.13-1

主要言語
Java
スター
10.5k
フォーク
1.5k
平均マージ
1日 9時間
マージ済み PR(30日)
130

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

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

はじめの一歩

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

github/copilot-sdk のほかの issue

github/copilot-sdk の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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