(kind: string, diffs: { file?: string; patch?: string }[] | undefined)
| 25 | } |
| 26 | |
| 27 | function diff(kind: string, diffs: { file?: string; patch?: string }[] | undefined) { |
| 28 | return diffs?.map((item, i) => ({ |
| 29 | ...item, |
| 30 | file: item.file === undefined ? undefined : redact(`${kind}-file`, String(i), item.file), |
| 31 | patch: item.patch === undefined ? undefined : redact(`${kind}-patch`, String(i), item.patch), |
| 32 | })) |
| 33 | } |
| 34 | |
| 35 | function source(part: SessionV1.FilePart) { |
| 36 | if (!part.source) return part.source |