Commit 921270a
committed
fix: preserve sourceProposedPlan through incremental event path
The thread.turn-start-requested handler updated modelSelection, runtimeMode,
and interactionMode but never stored the event's sourceProposedPlan field.
Because buildLatestTurn only carries forward sourceProposedPlan from the
previous latestTurn when turnIds match, the field was permanently lost for
new turns created via the incremental event path.
Fix:
- Add pendingSourceProposedPlan field to Thread to bridge the gap between
turn-start-requested (which has the plan reference but no turnId) and
later events that call buildLatestTurn (which create the turn).
- Store event.payload.sourceProposedPlan in the turn-start-requested handler.
- Pass pendingSourceProposedPlan to buildLatestTurn as a fallback for new
turns where the previous latestTurn turnId doesn't match.
- Seed pendingSourceProposedPlan in mapThread (snapshot path) for consistency.1 parent ea6a5ae commit 921270a
2 files changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
217 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
534 | 538 | | |
535 | 539 | | |
536 | 540 | | |
| 541 | + | |
537 | 542 | | |
538 | 543 | | |
539 | 544 | | |
| |||
629 | 634 | | |
630 | 635 | | |
631 | 636 | | |
| 637 | + | |
632 | 638 | | |
633 | 639 | | |
634 | 640 | | |
| |||
671 | 677 | | |
672 | 678 | | |
673 | 679 | | |
| 680 | + | |
674 | 681 | | |
675 | 682 | | |
676 | 683 | | |
| |||
755 | 762 | | |
756 | 763 | | |
757 | 764 | | |
| 765 | + | |
758 | 766 | | |
759 | 767 | | |
760 | 768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
0 commit comments