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

    Service for signing the GitHub Copilot CLI in, which serves all Copilot requests.

    The sign-in is a device code flow that the CLI runs and polls itself. This service starts it and reports its progress, so that it can be presented like any other device code flow.

    interface CopilotAuthService {
        onAuthStateChanged: Event<CopilotAuthState>;
        cancelSignIn(): Promise<void>;
        getAuthState(): Promise<CopilotAuthState>;
        setClient(client: undefined | CopilotAuthServiceClient): void;
        setExecutablePath(path: undefined | string): Promise<void>;
        signOut(): Promise<void>;
        startSignIn(enterpriseUrl?: string): Promise<DeviceCodeResponse>;
        waitForSignIn(): Promise<boolean>;
    }

    Implemented by

    Index

    Properties

    onAuthStateChanged: Event<CopilotAuthState>

    Event fired when authentication state changes.

    Methods

    • Tells the backend where the Copilot CLI is, as configured by the user.

      The CLI is not shipped with the application and has to be found on the machine hosting the backend, which cannot read the preferences of the user itself.

      Parameters

      • path: undefined | string

        Location of the CLI executable, or undefined to search for it

      Returns Promise<void>