Commit 05d42a2
Fix double compaction on first-turn budget exceeded (#308949)
* Fix double compaction on first-turn budget exceeded
When the first render of a turn throws BudgetExceededError and the
background summarizer is Idle, we fall back to a synchronous foreground
'full' summarization via renderWithSummarization. That path did not set
the 'summary applied this iteration' flag, so the post-render gate
(>= 80% + Idle) would also kick off a background 'inline' compaction
in the same buildPrompt call — producing both
summarizeConversationHistory-full and summarizeConversationHistory-inline.
- Set the flag on both foreground fallback call sites so the post-render
gate correctly short-circuits.
- Rename 'summaryAppliedThisIteration' to 'didSummarizeThisIteration' to
better reflect that it covers any summarization work (pre-render bg
apply, budget-exceeded bg apply, or foreground fallback).
* Update extensions/copilot/src/extension/intents/node/agentIntent.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 78e6db3 commit 05d42a2
1 file changed
+9
-6
lines changedLines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
468 | | - | |
469 | | - | |
470 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
471 | 472 | | |
472 | 473 | | |
473 | 474 | | |
| |||
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
481 | | - | |
| 482 | + | |
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
| |||
611 | 612 | | |
612 | 613 | | |
613 | 614 | | |
614 | | - | |
| 615 | + | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
| |||
621 | 622 | | |
622 | 623 | | |
623 | 624 | | |
| 625 | + | |
624 | 626 | | |
625 | 627 | | |
626 | 628 | | |
| 629 | + | |
627 | 630 | | |
628 | 631 | | |
629 | 632 | | |
| |||
656 | 659 | | |
657 | 660 | | |
658 | 661 | | |
659 | | - | |
| 662 | + | |
660 | 663 | | |
661 | 664 | | |
662 | 665 | | |
| |||
0 commit comments