Skip to content

Fix #5470: exclude duplicate query from history in CompressionQueryTransformer#5805

Closed
anuragg-saxenaa wants to merge 1 commit intospring-projects:mainfrom
anuragg-saxenaa:fix/issue-5470-compression-query-duplication
Closed

Fix #5470: exclude duplicate query from history in CompressionQueryTransformer#5805
anuragg-saxenaa wants to merge 1 commit intospring-projects:mainfrom
anuragg-saxenaa:fix/issue-5470-compression-query-duplication

Conversation

@anuragg-saxenaa
Copy link
Copy Markdown

@anuragg-saxenaa anuragg-saxenaa commented Apr 16, 2026

Duplicate of #5807 — closing in favor of the cleaner branch with DCO passing.

…pressionQueryTransformer

When the last history entry is a USER message matching the current query,
exclude it from effectiveHistory to prevent query duplication in the prompt.

Regression tests added:
- whenHistoryIsEmptyThenReturnOriginalQuery
- whenLastHistoryEntryMatchesCurrentQueryThenExcludeItFromHistory
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