MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / buildSettingSourcesProperties

Function buildSettingSourcesProperties

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

Source from the content-addressed store, hash-verified

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