Support autocomplete/ghost text for extension slash command arguments
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- javascript, typescript
- Ambito
- api, cli, developer-experience
Direzione di ricerca
Inizia dalla documentazione in generated/types per CommandDefinition e dalla registrazione delle estensioni mostrata tramite joinSession({ commands: [...] }). Traccia il modo in cui i comandi delle estensioni con ambito di progetto vengono gestiti in Copilot CLI. Done dovrebbe fornire una superficie SDK documentata per l’uso statico o i suggerimenti strutturati e per il completamento dinamico degli argomenti, con descrizioni quando supportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Please add an SDK/API surface that lets Copilot CLI extensions provide autocomplete, ghost text, or structured argument suggestions for extension slash commands.
Scenario
I am building a Copilot CLI extension that registers a deterministic /cost command via joinSession({ commands: [...] }). The command has useful subcommands/options such as:
/cost
/cost help
/cost panel on|off|refresh
/cost session <session-id>
/cost live-session <session-id>
/cost --plan pro|pro-plus|business|enterprise
/cost --billing-model usage-based|premium-requests
/cost --currency USD
Built-in slash commands appear to show ghost text / inline hints for supported arguments as the user types. For extension commands, I only see the command name/description; after typing /cost there does not appear to be a way to suggest supported subcommands/options.
Current SDK surface
The generated/types docs I found for CommandDefinition only expose:
export interface CommandDefinition {
name: string;
description?: string;
handler: CommandHandler;
}
That is enough to register /cost, but not enough to provide argument completions, examples, or dynamic suggestions.
Requested capability
It would be useful if extension commands could declare one or more of the following:
- static usage text/examples for ghost text after the command name
- structured subcommands/options/enum values
- dynamic completion callback based on the current argument prefix and session context
- optional descriptions for each subcommand/option
For example, something like:
commands: [
{
name: 'cost',
description: 'Show Copilot session cost.',
usage: 'panel on|off|refresh | session <session-id> | --plan <plan>',
completions: async ({ args, cursor, sessionId }) => [
{ value: 'panel', description: 'Open or manage the cost panel' },
{ value: 'session', description: 'Show cost for a completed session' },
{ value: '--plan', description: 'Compare against a subscription plan' }
],
handler
}
]
Why this matters
Extension slash commands can be deterministic command surfaces rather than model-routed prompts. Without argument hints, users have to remember command syntax or run a separate help command. Built-in-command-quality discoverability would make SDK extensions feel native and easier to learn.
Workaround today
The extension can implement /cost help, but that is less discoverable and does not help while typing.
Environment
Observed with Copilot CLI / SDK builds around 1.0.41-0 / 1.0.43 on Windows while authoring a project-scoped extension under .github/extensions/<name>/extension.mjs.
- Lingua principale
- Java
- Stelle
- 10.5k
- Fork
- 1.5k
- Merge medio
- 1g 9h
- PR unite (30g)
- 130
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/copilot-sdk
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2760 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
github/copilot-sdk#2759 ·
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
github/copilot-sdk#2758 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/copilot-sdk#2709 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
github/copilot-sdk#2673 ·
Tutte le issue di github/copilot-sdk
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·
-
Consent portal: creating a duplicate Purpose shows a generic error instead of "already exists" Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
wso2/dpdp-accelerator#287 ·