MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / readAssistantNullableStringField

Function readAssistantNullableStringField

src/core/bridge_coordinator.ts:14138–14151  ·  view source on GitHub ↗
(
  parsed: Record<string, any>,
  keys: string[],
  fallback: string | null,
)

Source from the content-addressed store, hash-verified

14136}
14137
14138function readAssistantNullableStringField(
14139 parsed: Record<string, any>,
14140 keys: string[],
14141 fallback: string | null,
14142): string | null {
14143 for (const key of keys) {
14144 if (!Object.prototype.hasOwnProperty.call(parsed, key)) {
14145 continue;
14146 }
14147 const normalized = String(parsed[key] ?? '').trim();
14148 return normalized || null;
14149 }
14150 return fallback;
14151}
14152
14153function readAssistantStringArrayField(
14154 parsed: Record<string, any>,

Calls

no outgoing calls

Tested by

no test coverage detected