MCPcopy Index your code
hub / github.com/Dimillian/CodexMonitor / normalizeSubagentKind

Function normalizeSubagentKind

src/features/threads/utils/threadRpc.ts:22–34  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

20}
21
22function normalizeSubagentKind(value: string): string {
23 const normalized = value
24 .trim()
25 .toLowerCase()
26 .replace(/[\s-]/g, "_");
27 if (normalized.startsWith("subagent_")) {
28 return normalized.slice("subagent_".length);
29 }
30 if (normalized.startsWith("sub_agent_")) {
31 return normalized.slice("sub_agent_".length);
32 }
33 return normalized;
34}
35
36function getSubagentKind(source: unknown): string | null {
37 if (typeof source === "string") {

Callers 1

getSubagentKindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected