Theia API Documentation v1.69.0
    Preparing search index...
    Index

    Constructors

    Properties

    contextKeyService: ContextKeyService
    currentTrust: undefined | boolean
    envVariablesServer: EnvVariablesServer
    messageService: MessageService
    onDidChangeWorkspaceTrust: Event<boolean> = ...
    onDidChangeWorkspaceTrustEmitter: Emitter<boolean> = ...
    pendingTrustDialog: undefined | Deferred<boolean>
    pendingTrustRequest: undefined | Deferred<undefined | boolean>
    preferences: PreferenceService
    preferenceSchemaService: PreferenceSchemaService
    statusBar: StatusBar
    toDispose: DisposableCollection = ...
    untitledWorkspaceService: UntitledWorkspaceService
    windowService: WindowService
    workspaceService: WorkspaceService
    workspaceTrust: Deferred<boolean> = ...
    workspaceTrustPref: WorkspaceTrustPreferences

    Methods

    • Check if the workspace is empty (no workspace or folder opened, or an untitled workspace with no folders). A saved workspace file with 0 folders is NOT empty - it still needs trust evaluation because it could have tasks defined.

      Returns Promise<boolean>

    • Request workspace trust from the user. This method follows VS Code's pattern:

      • If already trusted, returns true immediately
      • If there's already a pending trust request, returns the same promise (avoiding duplicate dialogs)
      • Otherwise, shows a dialog and waits for the user's response

      Unlike the initial trust resolution, this can be called multiple times and will prompt the user each time (unless a dialog is already open).

      Returns Promise<undefined | boolean>