(value: unknown)
| 37 | } |
| 38 | |
| 39 | function parseCollabAgentRefs(value: unknown) { |
| 40 | if (!value) { |
| 41 | return []; |
| 42 | } |
| 43 | if (Array.isArray(value)) { |
| 44 | return value |
| 45 | .map((entry) => parseCollabAgentRef(entry)) |
| 46 | .filter((entry): entry is CollabAgentRef => Boolean(entry)); |
| 47 | } |
| 48 | const single = parseCollabAgentRef(value); |
| 49 | return single ? [single] : []; |
| 50 | } |
| 51 | |
| 52 | function mergeCollabAgentRefs(...lists: CollabAgentRef[][]) { |
| 53 | const byThreadId = new Map<string, CollabAgentRef>(); |
no test coverage detected