argument-hint doesn't show for skills

オープン 初心者向け
#5,567 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, nodejs
領域
cli

調査の方向性

レポートに記載されているスキルからコマンドへの変換処理である cliSlashSkillMetadata から始めます。この処理は正しい argumentHint を受け取りますが、args フィールドのないコマンドメタデータを返します。/model などの組み込みコマンドが args をどのように設定してヒントを表示させているかを比較し、そのうえでスキルの argumentHint をリテラルの arg としてそこに設定してください。確認するには、再現手順のとおり .github/skills/hint-repro/SKILL.md を作成し、そのプロジェクトで CLI セッションを開始して /hint-repro と入力します。末尾にスペースがある場合とない場合の両方で、候補と入力行に [target] [--help] が表示されれば完了です。

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

説明

area:plugins
Describe the bug

A skill's description appears when typing its slash command, but its argument hint doesn't. The installed SKILL.md has a quoted, top-level argument-hint field in its YAML frontmatter

Affected version

1.0.115-8

Steps to reproduce the behavior
  1. In a local test project, create .github/skills/hint-repro/SKILL.md with this content:
---
name: hint-repro
description: Test whether skill argument hints are displayed.
argument-hint: "[target] [--help]"
---

If invoked, reply with "Hint test." Do not use tools.
  1. Start a fresh Copilot CLI session in that project
  2. Type /hint-repro without pressing Enter. Check the command suggestion and input line for [target] [--help]
  3. Add a trailing space and check again

The configured argument hint should be displayed. There is no need to submit the command or execute the skill

Expected behavior

The configured argument hint should appear when selecting or typing the skill's slash command, as described under “Skill frontmatter fields”:

https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference#skill-frontmatter-fields

Additional context

Reproduced on macOS ARM64

Built-in commands such as /model show their argument hints in the same terminal

While investigating, I found that cliSlashSkillMetadata receives the correct argumentHint, but the returned command metadata has no args field. In a temporary test process, adding this to the returned command made the full hint appear:

command.args = [{ type: "literal", text: skill.argumentHint }];

Removing that change made the hint disappear again

That seems to narrow it down to the skill-to-command conversion

I only tested the display behaviour, so the snippet above isn't intended as a complete fix

主要言語
Python
スター
11.5k
フォーク
2k
平均マージ
6時間 34分
マージ済み PR(30日)
3

環境構築

はじめの一歩

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

github/copilot-cli のほかの issue

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

似ている issue

Python の issue をもっと見る

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

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