Commit ef499ea
Eric Wheeler
refactor: make ask() message updates atomic
The `ask()` method was directly mutating the `lastMessage` object before calling `modifyClineMessages`, which is not an atomic operation. This refactor moves the mutation logic inside the `modifyClineMessages` callback to ensure that finding, updating, and saving the message occurs as a single, transactional operation.
Signed-off-by: Eric Wheeler <[email protected]>1 parent 316d9da commit ef499ea
1 file changed
+23
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
534 | 540 | | |
535 | 541 | | |
536 | 542 | | |
| |||
577 | 583 | | |
578 | 584 | | |
579 | 585 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | 586 | | |
585 | | - | |
586 | | - | |
587 | | - | |
| 587 | + | |
| 588 | + | |
588 | 589 | | |
589 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
590 | 604 | | |
591 | 605 | | |
592 | 606 | | |
| |||
0 commit comments