File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const keys = new Set([
3030
3131export function isV1 ( input : unknown ) {
3232 if ( typeof input !== "object" || input === null || Array . isArray ( input ) ) return false
33+ // altimate_change start — detect renamed nested V1 compaction keys
3334 if ( Object . keys ( input ) . some ( ( key ) => keys . has ( key ) ) ) return true
3435 const compaction = ( input as Record < string , unknown > ) . compaction
3536 if ( typeof compaction !== "object" || compaction === null || Array . isArray ( compaction ) ) return false
@@ -39,6 +40,7 @@ export function isV1(input: unknown) {
3940 return [ "tail_turns" , "preserve_recent_tokens" , "reserved" ] . some ( ( key ) =>
4041 Object . prototype . hasOwnProperty . call ( compaction , key ) ,
4142 )
43+ // altimate_change end
4244}
4345
4446export function migrate ( info : typeof ConfigV1 . Info . Type ) {
Original file line number Diff line number Diff line change @@ -769,7 +769,9 @@ export namespace SessionProcessor {
769769 start : match . state . time . start ,
770770 end : Date . now ( ) ,
771771 } ,
772+ // altimate_change start — persist only dispatch-capped attachments
772773 attachments : toolResultAttachments ,
774+ // altimate_change end
773775 } ,
774776 } )
775777
Original file line number Diff line number Diff line change @@ -1953,6 +1953,7 @@ export namespace SessionPrompt {
19531953 }
19541954 await Telemetry . shutdown ( )
19551955 // altimate_change end
1956+ // altimate_change start — resolve callbacks from this prompt generation only
19561957 for await ( const item of MessageV2 . stream ( sessionID ) ) {
19571958 if ( item . info . role === "user" ) continue
19581959 // Resolve only callers queued on THIS loop generation. A cancelled loop
@@ -1965,6 +1966,7 @@ export namespace SessionPrompt {
19651966 }
19661967 return item
19671968 }
1969+ // altimate_change end
19681970 throw new Error ( "Impossible" )
19691971 } )
19701972
You can’t perform that action at this time.
0 commit comments