authorgravatar for maria@kuuro.netmaria <maria@kuuro.net> 2026-10-04 18:38:32-03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-04 21:38:32+00:00
log2188bdd8b5c0251f40daebdb66647dd0150cf076
treee8ee228704c6e1b4b6f70da7082b6831a459d3de
parentb4381985db55755ff15340d118160c14006ced13
signature Signed by PGP key B5690EEEBB952194

revert(web): remove automatic compaction before resume (#15771)


1 files changed, 2 insertions(+), 29 deletions(-)

apps/web/src/components/ChatView.tsx+2-29
......@@ -8874,18 +8874,7 @@ export default function ChatView(props: ChatViewProps) {
88748874 );
88758875 const messageIdForSend = newMessageId();
88768876 const messageCreatedAt = new Date().toISOString();
8877 // Sending past the resume banner compacts first so the turn does not resend the stale
8878 // history. The message queues behind the /compact run; steering into it is rejected,
8879 // and a held queue would strand it.
8880 const compactBeforeSend =
8881 resumeCompactionBannerItem !== null &&
8882 !compactDisabled &&
8883 !hasHeldQueuedRuns &&
8884 multipleModelSelections === null &&
8885 messageTextForSend.toLowerCase() !== "/compact";
8886 const turnDispatchMode = compactBeforeSend ? "queue" : dispatchMode;
8887 const shouldQueueBehindActiveRun =
8888 compactBeforeSend || (phase === "running" && dispatchMode === "queue");
8877 const shouldQueueBehindActiveRun = phase === "running" && dispatchMode === "queue";
88898878 const outgoingMessageText = formatOutgoingPrompt({
88908879 provider: ctxSelectedProvider,
88918880 model: ctxSelectedModel,
......@@ -9451,22 +9440,6 @@ export default function ChatView(props: ChatViewProps) {
94519440 failure = turnAttachmentsResult;
94529441 }
94539442
9454 if (failure === null && compactBeforeSend) {
9455 const compactResult = await startThreadTurn({
9456 environmentId,
9457 input: {
9458 threadId: threadIdForSend,
9459 message: { messageId: newMessageId(), role: "user", text: "/compact", attachments: [] },
9460 modelSelection: ctxSelectedModelSelection,
9461 runtimeMode,
9462 interactionMode: sendInteractionMode,
9463 },
9464 });
9465 if (compactResult._tag === "Failure") {
9466 failure = compactResult;
9467 }
9468 }
9469
94709443 let backgroundDraftOpened = false;
94719444 let turnStartSucceeded = false;
94729445 if (failure === null && turnAttachmentsResult._tag === "Success") {
......@@ -9544,7 +9517,7 @@ export default function ChatView(props: ChatViewProps) {
95449517 titleSeed: title,
95459518 runtimeMode,
95469519 interactionMode: sendInteractionMode,
9547 dispatchMode: turnDispatchMode,
9520 dispatchMode,
95489521 ...(bootstrap ? { bootstrap } : {}),
95499522 createdAt: messageCreatedAt,
95509523 },