github / github/app

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

未关闭
#1,175 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bugs
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

### 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.

贡献指南

打开贡献指南

调研方向

在常规的 GitHub Copilot CLI 聊天中,使用 open_canvas,并指定 canvasId "editor" 和有效路径但不指定 scope,复现该问题。检查 list_canvas_capabilities 和 open_canvas 工具描述,将声明的 schema 与文档中记录的输入进行比较。只要编辑器能在不指定 scope 的情况下打开,或者必填字段及有效值能被清晰地显示出来,就算完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
github
领域
cli, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。