Skip to content

nodejs/cli-extension: resolving sdk paths and error log should be improved #946

@ilsubyeega

Description

@ilsubyeega
  1. Doing like this will result error: Error: Cannot find package '@github/copilot-sdk' imported from ...
import { joinSession } from "@github/copilot-sdk/extension.js";

instead of..

import { joinSession } from "@github/copilot-sdk/extension";

(.js difference)

  1. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions