π File detail
components/agents/utils.ts
π§© .tsπ 19 linesπΎ 528 bytesπ text
β Back to All Filesπ― Use case
This file lives under βcomponents/β, which covers shared React UI pieces. On the API surface it exposes getAgentSourceDisplayName β mainly functions, hooks, or classes. Dependencies touch lodash-es and src.
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
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(
π€ Exports (heuristic)
getAgentSourceDisplayName
π External import roots
Package roots from from "β¦" (relative paths omitted).
lodash-essrc
π₯οΈ Source preview
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))
}