Skip to content

Commit 59a7b46

Browse files
author
rsi-pr-agent
committed
fixup! fix(server): fork notice follows a first /compact and native replacement (#1864)
Fork-Domain: upstream-fixes Fork-Tier: bugfix Fork-Upstreamable: yes
1 parent 314965b commit 59a7b46

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/ProviderTurnStartService.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,19 @@ export const layer: Layer.Layer<
940940
return handoffBudget({
941941
tokenCap,
942942
modelContextWindow,
943-
userText: restartNote === "" ? userText : `${restartNote}\n\n${userText}`,
943+
userText: appendConversationForkContextFork(
944+
restartNote === "" ? userText : `${restartNote}\n\n${userText}`,
945+
conversationForkContextFork(
946+
projection.thread,
947+
conversationForkNoticeOwedFork(projection, {
948+
sameNativeThread,
949+
acceptedAttempts,
950+
nativeInputRunIds,
951+
legacyInputRunIds,
952+
}),
953+
),
954+
isCompactionCommandMessage(message),
955+
), // fork-hook: upstream-fixes/conversation-fork-context-budget
944956
attachments: message.attachments,
945957
providerThread: budgetProviderThread,
946958
nativeContextEstimate:

0 commit comments

Comments
 (0)