smallcloudai / refact-intellij

Refact AI: Open-source AI Code assistant with autocompletion, chat, refactoring and more for IntelliJ JetBrains IDEs
https://refact.ai
BSD 3-Clause "New" or "Revised" License
31 stars 12 forks source link

Migrate to a new Inline Completion API #121

Open BarracudaPff opened 5 months ago

BarracudaPff commented 5 months ago

Hi! For a long time, IntelliJ Platform lacked a built-in API to display inline completion (aka gray text completion). As a result, many plugins, including Refact.​ai, implemented it from scratch. In the latest 2023.3 release, the IntelliJ platform added an API for inline completion.

This new API allows developers to design plugins that enable inline completion, simplifying the process considerably. The primary benefit of this new API is that it enables multiple plugins to operate simultaneously, effectively enhancing overall system integration and compatibility.

The new built-in API is not compatible with implementations of other plugins, potentially causing two independent gray texts within the editor. We kindly invite you to explore the possibility of integrating our new API into your plugin at your earliest convenience. Your collaboration is crucial in achieving better synchronization between plugins for inline completion with the IntelliJ platform, thereby boosting the overall user experience.

Should you encounter any limitations or require additional features, please do not hesitate to let us know. We’re committed to ensuring this new API meets your requirements and improves the overall IntelliJ environment.

Here is our issue tracker.

Please migrate to the new API, you can find the entry points below:

It should cover all your features with current implementation and even more.

Thank you in advance!

reymondzzzz commented 5 months ago

Thank you so much for info! We need to support old version too, so I'm not sure about migration, but will research

Sopamo commented 4 months ago

This would actually be super nice, especially because 2024.1 is already released and I suppose not many users are still on < 2023.3? Right now, intellij's own code suggestions interfere with refact's, so it's often very hard to use refact.

reymondzzzz commented 4 months ago

Unfortunately, we have users who use previous stable version of Android Studio(2023.1.1). I noticed too that problem with disappearance suggestions. So I think I will make version checker for old and new logic