devchat-ai / devchat

Automate your dev tasks with AI-powered scripts, from your IDE's chat panel.
https://www.devchat.ai
Apache License 2.0
340 stars 39 forks source link

Optimize code completion by filtering out specific patterns #353

Closed yangbobo2021 closed 4 months ago

yangbobo2021 commented 4 months ago

The current code completion feature can be improved by explicitly filtering out certain patterns that signify the completion is meant for another file rather than the current context. This optimization can reduce noise and enhance the utility of code completions.

Patterns to Filter:

  1. Comment symbols followed by a filename, for instance: //<filename>
  2. Comment symbols followed by 'Code omitted...', example: //Code omitted...

By filtering out these specific patterns, we can make the code completion more relevant and useful for the developer. This enhancement could potentially improve coding efficiency by reducing the distractions caused by inappropriate completions.

Looking forward to discussing further on this and how we can implement it effectively.