argument-hint doesn't show for skills

Aberta Para iniciantes
#5,567 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
75/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
javascript, nodejs
Domínio
cli

Direção de pesquisa

Comece em cliSlashSkillMetadata, a conversão de skill para comando mencionada no relatório: ela recebe o argumentHint correto, mas retorna metadados do comando sem um campo args. Compare como comandos integrados, como /model, preenchem args para que a dica seja exibida e, então, defina ali o argumentHint da skill como um arg literal. Para verificar, crie .github/skills/hint-repro/SKILL.md como no repro, inicie uma sessão da CLI nesse projeto e digite /hint-repro; está concluído quando [target] [--help] aparecer na sugestão e na linha de entrada, com e sem espaço no final.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
Python
Estrelas
11.5k
Forks
2k
Merge médio
6h 34min
PRs com merge (30d)
3

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de github/copilot-cli

Todas as issues de github/copilot-cli

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.