MCPcopy
hub / github.com/Dimillian/CodexMonitor / buildCollabAgentRef

Function buildCollabAgentRef

src/utils/threadItems.collab.ts:9–21  ·  view source on GitHub ↗
(
  threadIdValue: unknown,
  nicknameValue?: unknown,
  roleValue?: unknown,
)

Source from the content-addressed store, hash-verified

7import { asString, normalizeStringList } from "./threadItems.shared";
8
9function buildCollabAgentRef(
10 threadIdValue: unknown,
11 nicknameValue?: unknown,
12 roleValue?: unknown,
13): CollabAgentRef | null {
14 const threadId = asString(threadIdValue).trim();
15 if (!threadId) {
16 return null;
17 }
18 const nickname = asString(nicknameValue ?? "").trim() || undefined;
19 const role = asString(roleValue ?? "").trim() || undefined;
20 return { threadId, nickname, role };
21}
22
23function parseCollabAgentRef(value: unknown): CollabAgentRef | null {
24 if (!value || typeof value !== "object") {

Callers 3

parseCollabAgentRefFunction · 0.85
buildCollabAgentStatusFunction · 0.85
parseCollabToolCallItemFunction · 0.85

Calls 1

asStringFunction · 0.90

Tested by

no test coverage detected