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

    A PreferenceInspection augmented with a derived, workspace-trust-aware source scope.

    interface AiConfigurationInspection<T extends JSONValue = JSONValue> {
        defaultValue: T | undefined;
        globalValue: T | undefined;
        preferenceName: string;
        sessionValue?: T;
        sourceScope?: PreferenceScope;
        value: T | undefined;
        workspaceFolderValue: T | undefined;
        workspaceValue: T | undefined;
    }

    Type Parameters

    • T extends JSONValue = JSONValue

    Hierarchy (View Summary)

    Index
    defaultValue: T | undefined

    Value in default scope.

    globalValue: T | undefined

    Value in user scope.

    preferenceName: string

    The preference identifier.

    sessionValue?: T

    Value in session scope (in-memory, set via --session-preference).

    sourceScope?: PreferenceScope

    The highest-precedence scope (honoring workspace trust) in which a value is explicitly set, i.e. the scope whose value PreferenceInspection.value reports. Walked in precedence order Session -> Folder -> Workspace -> User; undefined when only the default value applies. In an untrusted workspace the folder/workspace scopes are ignored, so sourceScope is Session, User or undefined.

    Session holds values passed with --session-preference. It isn't tied to a resource, wins over Folder, and has no settings file behind it, so it can't be used to pick a file to edit. Writing the key to another scope through AiConfigurationService.set or AiConfigurationService.update clears the session value until the window reloads. A value read with AiConfigurationService.get includes the session value, so writing it back saves the session value to that scope's settings file. To change part of an object or a list, start from AiConfigurationInspection.valueWithoutSession.

    For object values, PreferenceInspection.value is the object set in sourceScope alone, while AiConfigurationService.get merges the object across all scopes.

    value: T | undefined

    The value that is active, i.e. the value set in the lowest scope available.

    workspaceFolderValue: T | undefined

    Value in folder scope.

    workspaceValue: T | undefined

    Value in workspace scope.