| fix(model): deep-clone nested content in cloneMessages
cloneMessages used spread to shallow-copy content blocks, leaving
CanonicalToolResultBlock.content and CanonicalToolCallBlock.input
as shared references between original and clone. Extract a shared
clone utility that deep-copies these nested structures and replace
three duplicate private implementations.
Co-authored-by: Cursor <cursoragent@cursor.com>
| 8 天前 |