File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -935,18 +935,6 @@ export function shouldShowPlanFollowUpPrompt(input: {
935935// bare one ahead of it would run an uninstructed compaction first and charge for two.
936936const COMPACT_COMMAND_PATTERN = / ^ \/ c o m p a c t (?: \s | $ ) / i;
937937
938- export function shouldCompactBeforeSend ( input : {
939- resumeCompactionTokens : number | null ;
940- keepFullHistory : boolean ;
941- messageText : string ;
942- } ) : boolean {
943- return (
944- input . resumeCompactionTokens !== null &&
945- ! input . keepFullHistory &&
946- ! COMPACT_COMMAND_PATTERN . test ( input . messageText )
947- ) ;
948- }
949-
950938const sessionDismissedBranchMismatchKeys = new Set < string > ( ) ;
951939
952940export function dismissBranchMismatchForSession ( key : string ) : void {
@@ -1554,7 +1542,10 @@ export function planComposerTurn(input: {
15541542 // A stale Claude session compacts before this message so the turn does not re-read the
15551543 // old history. The message queues behind the /compact run, since steering into it is
15561544 // rejected.
1557- const compactBeforeSend = shouldCompactBeforeSend ( input ) ;
1545+ const compactBeforeSend =
1546+ input . resumeCompactionTokens !== null &&
1547+ ! input . keepFullHistory &&
1548+ ! COMPACT_COMMAND_PATTERN . test ( input . messageText ) ;
15581549 return {
15591550 // In worktree mode, require an explicit base branch so we don't silently
15601551 // fall back to local execution when branch selection is missing.
You can’t perform that action at this time.
0 commit comments