InternalProtected Readonly_ReadonlyonProtected ReadonlyonProtected ReadonlypreferencesProtected ReadonlytrustProtectedtrustedCached trust flag updated via onDidChangeWorkspaceTrust. Defaults to
false (fail closed): until the initial trust state has resolved, reads
return only user/default scope values. Asynchronous callers should
await ready before their first read.
Resolves once the initial workspace trust state has been resolved. Callers that need a deterministic trust state before their first read can await this promise.
ProtectedinitNarrows a raw PreferenceInspection according to workspace trust: when the workspace is untrusted the folder and workspace scope values are dropped so that only the user and default scopes contribute (failing closed until the trust state resolves). A trusted inspection is returned unchanged. This is the single definition of the trust-suppression rule, shared by get and by inspection-based consumers, so value reads and inspections cannot drift.
Helper for reading AI preferences that must ignore workspace/folder scopes when the current workspace is not trusted.
Writes should continue to go through
PreferenceServicedirectly; trust only affects reads.This is an implementation detail of AiConfigurationService. AI configuration consumers should go through
AiConfigurationServicerather than injecting this reader directly.