( parentFlags: BatchFlags | Record<string, unknown> | undefined, childFlags: TFlags, )
| 203 | } |
| 204 | |
| 205 | export function mergeParentFlags<TFlags extends Record<string, unknown>>( |
| 206 | parentFlags: BatchFlags | Record<string, unknown> | undefined, |
| 207 | childFlags: TFlags, |
| 208 | ): TFlags { |
| 209 | const parentRecord = readBatchFlags(parentFlags) ?? {}; |
| 210 | const childRecord = childFlags as Record<string, unknown>; |
| 211 | for (const key of INHERITED_PARENT_FLAG_KEYS) { |
| 212 | if (childRecord[key] === undefined && parentRecord[key] !== undefined) { |
| 213 | childRecord[key] = parentRecord[key]; |
| 214 | } |
| 215 | } |
| 216 | return childFlags; |
| 217 | } |
| 218 | |
| 219 | // Phase 4 (agent-cost) batch-step elision. When a non-default response level is |
| 220 | // requested for the whole batch, INTERMEDIATE steps are forced to `digest` so a |
no test coverage detected
searching dependent graphs…