MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / buildSettingSourcesProperties

Function buildSettingSourcesProperties

src/utils/status.tsx:165–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163}
164
165export function buildSettingSourcesProperties(): Property[] {
166 const enabledSources = getEnabledSettingSources();
167
168 // Filter to only sources that actually have settings loaded
169 const sourcesWithSettings = enabledSources.filter(source => {
170 const settings = getSettingsForSource(source);
171 return settings !== null && Object.keys(settings).length > 0;
172 });
173
174 // Map internal names to user-friendly names
175 // For policySettings, distinguish between remote and local (or skip if neither exists)
176 const sourceNames = sourcesWithSettings
177 .map(source => {
178 if (source === 'policySettings') {
179 const origin = getPolicySettingsOrigin();
180 if (origin === null) {
181 return null; // Skip - no policy settings exist
182 }
183 switch (origin) {
184 case 'remote':
185 return 'Enterprise managed settings (remote)';
186 case 'plist':
187 return 'Enterprise managed settings (plist)';
188 case 'hklm':
189 return 'Enterprise managed settings (HKLM)';
190 case 'file': {
191 const { hasBase, hasDropIns } = getManagedFileSettingsPresence();
192 if (hasBase && hasDropIns) {
193 return 'Enterprise managed settings (file + drop-ins)';
194 }
195 if (hasDropIns) {
196 return 'Enterprise managed settings (drop-ins)';
197 }
198 return 'Enterprise managed settings (file)';
199 }
200 case 'hkcu':
201 return 'Enterprise managed settings (HKCU)';
202 }
203 }
204 return getSettingSourceDisplayNameCapitalized(source);
205 })
206 .filter((name): name is string => name !== null);
207
208 return [
209 {
210 label: 'Setting sources',
211 value: sourceNames,
212 },
213 ];
214}
215
216export async function buildInstallationDiagnostics(): Promise<Diagnostic[]> {
217 const installWarnings = await checkInstall();

Callers 1

buildSecondarySectionFunction · 0.85

Calls 6

getEnabledSettingSourcesFunction · 0.85
getSettingsForSourceFunction · 0.85
getPolicySettingsOriginFunction · 0.85
keysMethod · 0.65

Tested by

no test coverage detected