github / github/app

open_canvas: Invalid input error when 'scope' field is missing from editor canvas

Ouverte
#1,175 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Bugs
Langage dominant
Aucune donnée de langage
Étoiles
2.1k
Forks
153
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Short summary

`open_canvas` for the `editor` canvas type returns an invalid input error when the `scope` field is not provided, even though it is not documented as required.

### Affected version or release

1.0.64-0

### Installation context

GitHub Copilot CLI chat session (general chat, not tied to a project session)

### What happened?

When calling `open_canvas` with `canvasId: "editor"` and a valid `path` in the input, the tool returned:

```
dDe: Invalid input for canvas "editor" open input: (root): "scope" is a required property. Inspect the canvas declaration for the expected input schema.
```

The canvas did not open. No `scope` field is listed or described in the canvas documentation or tool description.

### Steps to reproduce

1. From a general chat session (not a project session), call `open_canvas` with:
```json
{
"canvasId": "editor",
"instanceId": "my-canvas-instance",
"input": {
"path": "C:\\Users\\\\.copilot\\session-state\\\\files\\example.md"
}
}
```
2. Observe the error response.

### Expected behavior

The editor canvas should open with the specified file, or the error message should clearly indicate that `scope` is a required field and document valid values (e.g., `user`, `project`, `session`).

### Additional context

- The `list_canvas_capabilities` tool would reveal the schema, but the error message itself gives no hint.
- The `open_canvas` tool description does not mention a required `scope` field for the `editor` canvas.
- Surfacing required fields in the error message or tool description would prevent this confusion.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduisez le problème dans un chat GitHub Copilot CLI général en utilisant open_canvas avec canvasId "editor" et un chemin valide, mais sans scope. Inspectez list_canvas_capabilities et la description de l’outil open_canvas afin de comparer le schéma déclaré aux entrées documentées. C’est terminé si l’éditeur s’ouvre sans scope ou si le champ requis et les valeurs valides sont clairement affichés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github
Domaine
cli, tooling
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.