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

Function mapThread

packages/codex-native-api/src/codex_app_client.ts:2754–2764  ·  view source on GitHub ↗
(raw, includeTurns)

Source from the content-addressed store, hash-verified

2752}
2753
2754function mapThread(raw, includeTurns) {
2755 return {
2756 threadId: String(raw.id),
2757 title: raw.name ? String(raw.name) : null,
2758 cwd: raw.cwd ? String(raw.cwd) : null,
2759 path: raw.path ? String(raw.path) : null,
2760 updatedAt: normalizeTimestamp(raw.updatedAt),
2761 preview: typeof raw.preview === 'string' ? raw.preview : '',
2762 turns: includeTurns && Array.isArray(raw.turns) ? raw.turns.map(mapTurn) : [],
2763 };
2764}
2765
2766function normalizeTimestamp(value) {
2767 const numeric = Number(value || 0);

Callers 1

readThreadMethod · 0.70

Calls 1

normalizeTimestampFunction · 0.70

Tested by

no test coverage detected