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

Function getSourceDisplayName

source code/utils/settings/constants.ts:48–67  ·  view source on GitHub ↗
(
  source: SettingSource | 'plugin' | 'built-in',
)

Source from the content-addressed store, hash-verified

46 * @returns Short capitalized display name like 'User', 'Project', 'Plugin'
47 */
48export function getSourceDisplayName(
49 source: SettingSource | 'plugin' | 'built-in',
50): string {
51 switch (source) {
52 case 'userSettings':
53 return 'User'
54 case 'projectSettings':
55 return 'Project'
56 case 'localSettings':
57 return 'Local'
58 case 'flagSettings':
59 return 'Flag'
60 case 'policySettings':
61 return 'Managed'
62 case 'plugin':
63 return 'Plugin'
64 case 'built-in':
65 return 'Built-in'
66 }
67}
68
69/**
70 * Get display name for a setting or permission rule source (lowercase, for inline use)

Callers 3

getOverrideSourceLabelFunction · 0.85
groupBySourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected