MCPcopy
hub / github.com/kagent-dev/kagent / convertToUserFriendlyName

Function convertToUserFriendlyName

ui/src/lib/utils.ts:170–174  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

168
169const NAMESPACE_SEPARATOR = "__NS__";
170export function convertToUserFriendlyName(name: string): string {
171 if (!name) return "Unknown Source";
172 name = name.replace(NAMESPACE_SEPARATOR, "/");
173 return name.replace(/_/g, "-");
174}
175
176export function isAgentToolName(name: string | undefined): boolean {
177 return typeof name === "string" && name.includes(NAMESPACE_SEPARATOR);

Callers 5

ToolDisplayFunction · 0.90
AgentCallDisplayFunction · 0.90
AskUserDisplayFunction · 0.90
getDisplayNameFunction · 0.90
getSourceFromMetadataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected