argument-hint doesn't show for skills

未關閉 適合新手
#5,567 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
75/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript, nodejs
領域
cli

研究方向

從報告中提到的 skill 轉命令環節 cliSlashSkillMetadata 開始:它接收到了正確的 argumentHint,但回傳的命令中繼資料沒有 args 欄位。對比 /model 等內建命令如何填入 args 以顯示提示,然後在那裡將該 skill 的 argumentHint 設定為字面量參數。驗證時,依照重現步驟建立 .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 分鐘
30 天內合併 PR
3

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/copilot-cli 的其他 Issue

查看 github/copilot-cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。