MCPcopy Create free account
hub / github.com/xerrors/Yuxi / getAgentConfigOptionValue

Function getAgentConfigOptionValue

web/src/utils/agentConfigUtils.js:23–34  ·  view source on GitHub ↗
(option)

Source from the content-addressed store, hash-verified

21export const getAgentConfigOptions = (item) => (Array.isArray(item?.options) ? item.options : [])
22
23export const getAgentConfigOptionValue = (option) => {
24 if (typeof option !== 'object' || option === null) return option
25 return (
26 option.key ||
27 option.id ||
28 option.value ||
29 option.name ||
30 option.db_id ||
31 option.slug ||
32 option.label
33 )
34}
35
36export const getAgentConfigOptionLabel = (option) => {
37 if (typeof option !== 'object' || option === null) return option

Callers 3

normalizeMentionResourceFunction · 0.90
useAgentMentionConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected