Due to incorrect implementation of event listeners, if more than one project was open, events like caret change were propagated between editors. This PR fixes it.
Test plan
Test separately with four different options ([opened file | active file | caret position | selected text]):
Open two projects in IntelliJ.
Change [opened file | active file | caret position | selected text] for the first project
Change [opened file | active file | caret position | selected text] for the second project
Files set as context in the Cody chat should be different and match files activated on the previous steps.
Changes
Due to incorrect implementation of event listeners, if more than one project was open, events like caret change were propagated between editors. This PR fixes it.
Test plan
Test separately with four different options ([opened file | active file | caret position | selected text]):