Commit a4c663a
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 05f6a60 commit a4c663a
1 file changed
+23
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
532 | 538 | | |
533 | 539 | | |
534 | 540 | | |
| |||
575 | 581 | | |
576 | 582 | | |
577 | 583 | | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | 584 | | |
583 | | - | |
584 | | - | |
585 | | - | |
| 585 | + | |
| 586 | + | |
586 | 587 | | |
587 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
588 | 602 | | |
589 | 603 | | |
590 | 604 | | |
| |||
0 commit comments