Merge latest main and preserve teacher upgrade safeguards
This commit is contained in:
@@ -479,11 +479,13 @@ export class CodingTeacherService {
|
||||
const previous = topic.requests.at(-1);
|
||||
const reuse = previous && !previous.origin && previous.projectId === scope.projectId
|
||||
&& previous.sourceConversationId === input.sourceConversationId
|
||||
&& previous.presentation === 'reply-v1'
|
||||
&& previous.teacherVersion === selected.version && previous.runtimeThreadId;
|
||||
newConversationSegment = !reuse;
|
||||
// Yuxi binds both project and Pi source to a thread. Preserve its native
|
||||
// summary middleware within a segment; explicitly carry bounded public
|
||||
// history only when a new scope/release starts another segment.
|
||||
// history only when a new scope, release, or reply protocol starts another
|
||||
// segment. Older checkpoints may still contain retired component instructions.
|
||||
topic.conversation!.runtimeThreadId = reuse || randomUUID();
|
||||
topic.conversation!.segmentTurns = reuse ? topic.conversation!.segmentTurns + 1 : 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user