MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / buildSettingSourcesProperties

Function buildSettingSourcesProperties

source code/utils/status.tsx:128–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 return diagnostics;
127}
128export function buildSettingSourcesProperties(): Property[] {
129 const enabledSources = getEnabledSettingSources();
130
131 // Filter to only sources that actually have settings loaded
132 const sourcesWithSettings = enabledSources.filter(source => {
133 const settings = getSettingsForSource(source);
134 return settings !== null && Object.keys(settings).length > 0;
135 });
136
137 // Map internal names to user-friendly names
138 // For policySettings, distinguish between remote and local (or skip if neither exists)
139 const sourceNames = sourcesWithSettings.map(source => {
140 if (source === 'policySettings') {
141 const origin = getPolicySettingsOrigin();
142 if (origin === null) {
143 return null; // Skip - no policy settings exist
144 }
145 switch (origin) {
146 case 'remote':
147 return 'Enterprise managed settings (remote)';
148 case 'plist':
149 return 'Enterprise managed settings (plist)';
150 case 'hklm':
151 return 'Enterprise managed settings (HKLM)';
152 case 'file':
153 {
154 const {
155 hasBase,
156 hasDropIns
157 } = getManagedFileSettingsPresence();
158 if (hasBase && hasDropIns) {
159 return 'Enterprise managed settings (file + drop-ins)';
160 }
161 if (hasDropIns) {
162 return 'Enterprise managed settings (drop-ins)';
163 }
164 return 'Enterprise managed settings (file)';
165 }
166 case 'hkcu':
167 return 'Enterprise managed settings (HKCU)';
168 }
169 }
170 return getSettingSourceDisplayNameCapitalized(source);
171 }).filter((name): name is string => name !== null);
172 return [{
173 label: 'Setting sources',
174 value: sourceNames
175 }];
176}
177export async function buildInstallationDiagnostics(): Promise<Diagnostic[]> {
178 const installWarnings = await checkInstall();
179 return installWarnings.map(warning => warning.message);

Callers 1

buildSecondarySectionFunction · 0.85

Calls 6

getEnabledSettingSourcesFunction · 0.85
getSettingsForSourceFunction · 0.85
getPolicySettingsOriginFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected