File size: 528 Bytes
064bfd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import capitalize from 'lodash-es/capitalize.js'
import type { SettingSource } from 'src/utils/settings/constants.js'
import { getSettingSourceName } from 'src/utils/settings/constants.js'
export function getAgentSourceDisplayName(
source: SettingSource | 'all' | 'built-in' | 'plugin',
): string {
if (source === 'all') {
return 'Agents'
}
if (source === 'built-in') {
return 'Built-in agents'
}
if (source === 'plugin') {
return 'Plugin agents'
}
return capitalize(getSettingSourceName(source))
}
|