sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.53k stars 261 forks source link

do not clobber other @-mentions when initial context changes #5121

Closed sqs closed 1 month ago

sqs commented 1 month ago

If you manually @-mention a file in Cody chat and then change your current editor selection, your manual @-mention is clobbered. This was a bug introduced when we changed the @-mention nodes from Lexical TextNodes to DecoratorNode-based nodes. Now we need to traverse the tree and check all nodes instead of just checking the TextNodes.

Test plan

As described above.

Changelog