Skip to content

[cherry-pick] Add PatchBased02UnifiedEagerness prompt strategy - #334978

Merged
Ulugbek Abdullaev (ulugbekna) merged 1 commit into
release/1.137from
ulugbekna/cherry-pick-333302-release-1.137
Sep 8, 2026
Merged

[cherry-pick] Add PatchBased02UnifiedEagerness prompt strategy#334978
Ulugbek Abdullaev (ulugbekna) merged 1 commit into
release/1.137from
ulugbekna/cherry-pick-333302-release-1.137

Conversation

@ulugbekna

Copy link
Copy Markdown
Contributor

Cherry-pick of #333302 from main.

Adds the standalone PatchBased02UnifiedEagerness prompting strategy as a clone of PatchBased02Unified with eagernessPrompt: "aggressionHighLow". The prerequisite from #333606 is already present on release/1.137 via #334830.

Validation:

  • Copilot typecheck
  • 6 targeted unit tests across prompt crafting, provider configuration, and strategy options

Add the standalone PatchBased02UnifiedEagerness strategy as a clone of PatchBased02Unified with the aggressionHighLow eagerness prompt. Apply strategy configuration to default-model retries and cover prompt construction, response format, and configuration propagation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 7, 2026 21:33
@ulugbekna Ulugbek Abdullaev (ulugbekna) added this to the 1.137.0 milestone Sep 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The change is a straightforward additive strategy variant with consistent wiring across config, prompt building, and provider selection, and it includes targeted unit test coverage for the new behavior.

Review tier: Lite
Findings: None

What changed in this PR

This PR cherry-picks the addition of a new Copilot inline-edits prompting strategy, PatchBased02UnifiedEagerness, implemented as a PatchBased02Unified variant with eagernessPrompt: "aggressionHighLow" baked into the per-strategy configuration.

Changes:

  • Add PromptingStrategy.PatchBased02UnifiedEagerness and wire it into eagerness recognition and response-format selection.
  • Factor out the shared PatchBased02 unified strategy config and introduce a new strategy config entry that sets eagernessPrompt: "aggressionHighLow".
  • Extend provider/prompt-crafting logic and add targeted unit tests covering config application, eagerness detection, and prompt composition ordering.
File Description
extensions/​copilot/​src/​platform/​inlineEdits/​common/​dataTypes/​xtabPromptOptions.ts Adds the new prompting strategy and per-strategy config override for eagerness, and updates strategy-based helpers.
extensions/​copilot/​src/​platform/​inlineEdits/​test/​common/​xtabPromptOptions.spec.ts Adds unit tests validating config parity vs unified and eagerness recognition after config application.
extensions/​copilot/​src/​extension/​xtab/​node/​xtabProvider.ts Includes the new strategy in system prompt selection.
extensions/​copilot/​src/​extension/​xtab/​test/​node/​xtabProvider.spec.ts Adds coverage for strategy inclusion and eagerness prompt propagation in model config overrides.
extensions/​copilot/​src/​extension/​xtab/​common/​promptCrafting.ts Treats the new strategy as patch-based for cursor-location prompt building and postscript eagerness tagging.
extensions/​copilot/​src/​extension/​xtab/​test/​common/​promptCrafting.spec.ts Adds a regression test ensuring eagerness tags are placed before the postscript for the new strategy.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ulugbekna
Ulugbek Abdullaev (ulugbekna) merged commit 023b880 into release/1.137 Sep 8, 2026
31 checks passed
@ulugbekna
Ulugbek Abdullaev (ulugbekna) deleted the ulugbekna/cherry-pick-333302-release-1.137 branch September 8, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants