ReadonlyreadyResolves once the underlying preference service and the initial workspace-trust state are ready. Await this before the first read for a deterministic, trust-aware result.
Retrieves the effective, trust-aware value for the given preference, including a session value. To change part of an object or a list and write it back, start from AiConfigurationInspection.valueWithoutSession.
the preference identifier.
OptionaldefaultValue: T
the value to return when no value is stored.
OptionalresourceUri: string
the uri of the resource for which the preference is read.
Retrieves the per-scope values for the given preference, enriched with a derived, trust-aware AiConfigurationInspection.sourceScope and that scope's value as PreferenceInspection.value (see AiConfigurationInspection.sourceScope for object values).
the preference identifier.
OptionalresourceUri: string
the uri of the resource for which the preference is inspected.
Writes value to the given scope. Maps to PreferenceService.set.
the preference identifier.
the new value (must be JSON-serializable). undefined clears the value in the given scope.
the scope to write to. For PreferenceScope.Folder a resourceUri is required.
OptionalresourceUri: string
the uri of the resource for which the preference is stored.
"Smart write": picks the scope so that the effective value becomes value. Maps to
PreferenceService.updateValue.
the preference identifier.
the value to apply (must be JSON-serializable). undefined resets the preference to its default value.
OptionalresourceUri: string
the uri of the resource to which the change applies.
Framework API for reading and writing AI-related (
ai-features.*) preferences.AiConfigurationServicewraps the corePreferenceServiceand is the intended extension point for adopters and extensions that configure AI features: prefer it over talking toPreferenceServicedirectly forai-features.*keys. Routing all AI configuration through this seam keeps consumers insulated from future changes to how AI preferences are stored.Reads (get, inspect) are workspace-trust-aware: workspace and folder scope values are suppressed while the workspace is untrusted (failing closed until the trust state resolves), matching how AI features read preferences today. Session values (set via
--session-preference) apply regardless of trust. Writes (set, update) are never gated by trust.