πŸ“„ 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-es
  • src

πŸ–₯️ 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))
}