Skip to content

Conversation

@tamuratak
Copy link
Contributor

Fix context handling in ChatWidget while re-editing chat requests. currentElement.variables should be added to currentContext. Fix #281766.

Copilot AI review requested due to automatic review settings December 26, 2025 11:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes context handling when re-editing chat requests by ensuring that both attachedContext and variables from the current request are included in the context when entering edit mode.

Key Changes

  • Refactored inline filtering logic into a reusable addToContext helper function
  • Added deduplication logic using a Set to prevent duplicate context entries when combining attachedContext and variables
  • Fixed bug where currentElement.variables was not being added to the editing context

@tamuratak tamuratak closed this Dec 26, 2025
@tamuratak tamuratak reopened this Dec 26, 2025
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.

Editing submitted GitHub Copilot prompt removes file references

2 participants