nodejs/cli-extension: resolving sdk paths and error log should be improved
- 主要言語
- Java
- スター
- 10.5k
- フォーク
- 1.5k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 128
説明
1. Doing like this will result error: `Error: Cannot find package '@github/copilot-sdk' imported from ...`
```ts
import { joinSession } from "@github/copilot-sdk/extension.js";
```
instead of..
```ts
import { joinSession } from "@github/copilot-sdk/extension";
```
(`.js` difference)
2. Error handling should be more improved, at CLI `v1.0.12`, it shows only single line not stacktrace etc, so hard to debug. e.g:
```
[INFO] Launching extension: /tmp/copilot/test/.github/extensions/test/extension.mjs
[INFO] [extension:/tmp/copilot/test/.github/extensions/test/extension.mjs] [extension-bootstrap] Failed to load extension: SyntaxError: Unexpected token 'export'
[INFO] Extension exited: /tmp/copilot/test/.github/extensions/test/extension.mjs (code=1, signal=null)
[ERROR] Extension failed during startup: /tmp/copilot/test/.github/extensions/test/extension.mjs (code=1, signal=null)
```
```
[INFO] Found 1 extension(s), launching 1 (0 disabled)
[INFO] Launching extension: /tmp/copilot/test/.github/extensions/test/extension.mjs
[INFO] [extension:/tmp/copilot/test/.github/extensions/test/extension.mjs] [extension-bootstrap] Failed to load extension: Error: Invalid package config /tmp/copilot/test/.github/extensions/test/package.json.
[INFO] Extension exited: /tmp/copilot/test/.github/extensions/test/extension.mjs (code=1, signal=null)
[ERROR] Extension failed during startup: /tmp/copilot/test/.github/extensions/test/extension.mjs (code=1, signal=null)
```
コントリビューションガイド
評価
この issue はまだ評価されていません。