@@ -8,21 +8,23 @@ import { modelSelectionsEqual } from "@t3tools/shared/model";
88import { runRanAfter } from "@t3tools/shared/orchestrationV2ThreadError" ;
99
1010/**
11- * The model or effort change a new run brings, measured from the latest run the timeline shows,
12- * through its message or its handoff row, so consecutive dividers always chain. `baseline` stands in when there is none,
13- * such as a fork's source run. Callers skip starts with a context handoff; the handoff item already
14- * shows those.
11+ * The model or effort change a new run brings, measured from the latest run the timeline shows
12+ * through its message or its handoff row, so consecutive dividers always chain. `baseline` stands
13+ * in when there is none, such as a fork's source run. Callers skip starts with a context handoff;
14+ * the handoff item already shows those.
1515 */
1616export function modelSwitchSince (
1717 projection : Pick < OrchestrationV2ThreadProjection , "runs" | "turnItems" > ,
1818 to : ModelSelection ,
1919 baseline ?: ModelSelection ,
2020) : Pick < Extract < OrchestrationV2TurnItem , { type : "user_message" } > , "modelSwitch" > {
21- // Clients hide pending queued messages and replace `/compact` with a compaction row.
21+ // Clients hide pending queued messages, fold async answers into their question, and replace
22+ // `/compact` with a compaction row.
2223 const shown = new Set (
2324 projection . turnItems . flatMap ( ( item ) =>
2425 item . type === "user_message" &&
2526 ! ( item . inputIntent === "queued_turn" && item . status === "pending" ) &&
27+ ! item . messageId . startsWith ( "async-answer:" ) &&
2628 ! isCompactionCommandMessage ( { role : "user" , ...item } )
2729 ? [ item . messageId ]
2830 : [ ] ,
0 commit comments