Skip to content

feat: Enhance chat prompt construction with prior findings and new ch… - #55

Merged
AnkanSaha merged 1 commit into
mainfrom
maintainer/ankan
Jul 15, 2026
Merged

feat: Enhance chat prompt construction with prior findings and new ch…#55
AnkanSaha merged 1 commit into
mainfrom
maintainer/ankan

Conversation

@AnkanSaha

Copy link
Copy Markdown
Member

…anges diff

  • Updated constructChatPromptText to prefer priorFindings over full diff for efficiency.
  • Added handling for newChangesDiff to ensure fresh commits are considered.
  • Improved context sections in the prompt for better clarity.

feat: Introduce file review prompt for individual file analysis

  • Created constructFileReviewPromptText to handle per-file reviews in a structured manner.
  • Included context about the file, author, and related local context for better analysis.

feat: Implement merge review prompt for synthesizing findings

  • Added constructMergeReviewPromptText to aggregate per-file results into a final review.
  • Ensured the output adheres to a consistent JSON structure for downstream processing.

refactor: Centralize tone instructions for consistent feedback

  • Created getToneInstructions to standardize tone and language guidance across prompts.
  • Removed redundant tone instructions from individual prompts.

feat: Add concurrency utility for managing adapter requests

  • Implemented mapWithConcurrency to limit concurrent requests and prevent rate-limiting issues.

feat: Introduce context budget management for diff character limits

  • Replaced fixed character limits with a dynamic budget based on model context windows.
  • Added functions to estimate tokens and fit findings to budget constraints.

feat: Implement local git context helpers for diff and file management

  • Created functions to fetch local diffs, check reviewable files, and build a repo map.
  • Added support for extracting signatures from files to enhance context during reviews.

test: Add comprehensive tests for concurrency, context budget, and git context utilities

  • Implemented tests for mapWithConcurrency, contextBudget, and gitContext functionalities.
  • Ensured coverage for edge cases and expected behaviors in various scenarios.

…anges diff

- Updated `constructChatPromptText` to prefer `priorFindings` over full `diff` for efficiency.
- Added handling for `newChangesDiff` to ensure fresh commits are considered.
- Improved context sections in the prompt for better clarity.

feat: Introduce file review prompt for individual file analysis

- Created `constructFileReviewPromptText` to handle per-file reviews in a structured manner.
- Included context about the file, author, and related local context for better analysis.

feat: Implement merge review prompt for synthesizing findings

- Added `constructMergeReviewPromptText` to aggregate per-file results into a final review.
- Ensured the output adheres to a consistent JSON structure for downstream processing.

refactor: Centralize tone instructions for consistent feedback

- Created `getToneInstructions` to standardize tone and language guidance across prompts.
- Removed redundant tone instructions from individual prompts.

feat: Add concurrency utility for managing adapter requests

- Implemented `mapWithConcurrency` to limit concurrent requests and prevent rate-limiting issues.

feat: Introduce context budget management for diff character limits

- Replaced fixed character limits with a dynamic budget based on model context windows.
- Added functions to estimate tokens and fit findings to budget constraints.

feat: Implement local git context helpers for diff and file management

- Created functions to fetch local diffs, check reviewable files, and build a repo map.
- Added support for extracting signatures from files to enhance context during reviews.

test: Add comprehensive tests for concurrency, context budget, and git context utilities

- Implemented tests for `mapWithConcurrency`, `contextBudget`, and `gitContext` functionalities.
- Ensured coverage for edge cases and expected behaviors in various scenarios.
@AnkanSaha AnkanSaha self-assigned this Jul 15, 2026
@AnkanSaha
AnkanSaha merged commit b4a102c into main Jul 15, 2026
1 of 2 checks passed
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.

1 participant