Theia API Documentation v1.76.0
    Preparing search index...

    Provides the Copilot SDK that belongs to the Copilot CLI in use.

    The SDK is not a dependency of this extension. It is published as @github/copilot-sdk, but that package depends on the CLI, which is a large proprietary binary that an application must not have to ship, see CopilotCliLocator. The CLI carries its own copy of the SDK, so the one belonging to the CLI that is actually going to serve the requests is loaded from there. What is used of its API is mirrored in copilot-sdk-types.ts rather than taken from the package.

    An installed @github/copilot-sdk is used when the CLI does not carry one, so that an application which does depend on the package keeps working.

    Index

    Constructors

    Properties

    cliLocator: CopilotCliLocator
    loaded: undefined | Promise<CopilotSdkApi>
    loadedFrom: undefined | string
    logger: ILogger

    Methods

    • Dynamic import through a constructed function, so that a bundler leaves it alone: what is imported here is resolved on the machine running the backend, not at build time.

      Parameters

      • url: string

      Returns Promise<unknown>

    • Imports an installed SDK if there is one, so that a missing package is reported as the CLI not providing what is needed rather than as a module that cannot be found.

      Returns unknown