Skip to content

Commit a40622f

Browse files
committed
tweak
1 parent b4ef571 commit a40622f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

packages/opencode/src/session/session.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,15 +616,16 @@ export const layer: Layer.Layer<Service, never, Bus.Service | Storage.Service> =
616616
})
617617

618618
for (const part of msg.parts) {
619-
yield* updatePart({
619+
const p: MessageV2.Part = {
620620
...part,
621621
id: PartID.ascending(),
622622
messageID: cloned.id,
623623
sessionID: session.id,
624-
...(part.type === "compaction" && part.tail_start_id
625-
? { tail_start_id: idMap.get(part.tail_start_id) }
626-
: {}),
627-
})
624+
}
625+
if (p.type === "compaction" && p.tail_start_id) {
626+
p.tail_start_id = idMap.get(p.tail_start_id)
627+
}
628+
yield* updatePart(p)
628629
}
629630
}
630631
return session

0 commit comments

Comments
 (0)