Posted in

体验 JetBrains Rider 2024.1.4 中的完整行代码提示 | .NET 工具博客_AI阅读总结 — 包阅AI

包阅导读总结

1.

关键词:Full Line Code Completion、JetBrains Rider、Plugin、Local、Feedback

2.

总结:本文介绍了 JetBrains Rider 中的新功能 Full Line Code Completion(FLCC),包括其能预测下一行代码、语法准确、本地处理、速度快且免费,还说明了如何安装试用、模型下载设置、可适用的语言,强调用户反馈对优化的重要性。

3.

主要内容:

– Full Line Code Completion 简介

– 是为特定编程语言微调的本地快速 AI 模型

– 预测当前范围内的下一行代码,语法正确,减少噪音

– 本地处理保证隐私,支持离线,速度快且对现有订阅用户免费

– 试用方法

– 早期版本在 Staff Picks 或通过搜索安装插件

– 2024.2 版本已捆绑,可在“设置|编辑器”中验证和启用

– 可预先下载 C、CSS-like、JavaScript/TypeScript 等语言的模型,可设置下载选项

– 示例与自定义

– 根据当前文件和光标位置预测

– 可利用现有代码模式,代码完成键可自定义

– 用户反馈

– 模型持续微调,用户反馈至关重要,可下载更新版本并提供意见

思维导图:

文章地址:https://blog.jetbrains.com/dotnet/2024/07/10/full-line-code-completion-in-jetbrains-rider/

文章来源:blog.jetbrains.com

作者:Khalid Abuhakmeh

发布时间:2024/7/10 13:49

语言:英文

总字数:865字

预计阅读时间:4分钟

评分:83分

标签:.NET,JetBrains Rider,代码提示,人工智能模型,IDE 增强


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

.NET Tools

Try Full Line Code Completion in JetBrains Rider

Full Line Code Completion (FLCC), a local and fast AI model fine-tuned for product-specific programming languages, is one of the most anticipated features of this release. In this post, we’d like to introduce you to FLCC, explain what it is and what it isn’t, and invite you to try it out and provide feedback because you, as valued community members, complete us. Let’s get into it.

What is Full Line Code Completion?

Full Line Code Completion is an IntelliJ-platform plugin designed to predict the following line of code in the current scope. Predictions use a fine-tuned model for each language to suggest syntactically correct lines. Syntactic accuracy means there’s no chance that FLCC will suggest anything that will be a compilation error in the current scope of your code. Focusing on correctness means more valuable suggestions and less noise in the editor, keeping you in the coding flow.

In addition to correctness, FLCC is entirely local, which means all suggestions are processed and presented in the privacy of your development environment. Local also enables offline scenarios for those famous coding sessions on trains, planes, and automobiles. The locality of the models also means suggestions are “blink and you’ll miss it” fast. FLCC speed is another way we help you stay in the flow.

Finally, the best part of FLCC is that it’s included at no additional cost to current JetBrains IDE subscription holders. Yes, that’s right; it’s part of the core JetBrains IDE experience.

Check out our YouTube announcement for a visual summary of FLCC. Developer advocate Paul Everitt explains FLCC in his usual charming way.

VIDEO

I’d also recommend reading the IntelliJ Full Line Code Completion announcement, as it provides further details for those more curious about the plugin’s inner workings.
This sounds great, but what about the JetBrains Rider user community? When do we get access to FLCC? Well… right now!

Trying out Full Line Code Completion

For earlier versions of JetBrains Rider, (the minor updates to 2024.1, starting with Rider 2024.1.4), the plugin can be found under the Staff Picks category of the Plugins section or by searching for “Full Line Completion” in the marketplace tab. Install the plugin as you would any other plugin from our JetBrains Marketplace.

JetBrains Marketplace tab in Plugins

As of the 2024.2 release of Rider, the Full Line Code Completion plugin is bundled and requires no additional efforts for you to start taking advantage of it.

You can verify that the plugin is available and enabled by navigating to “Settings | Editor” and finding the “Code Completion” section.

In this section, you’ll see a “Machine Learning-Assisted Completion” group, where you can pre-emptively download the models for each supported language in JetBrains Rider: C#, CSS-like, and JavaScript/TypeScript. Before F# folks ask, we are also researching F# support. C++ support for game developers is also coming soon.

Machine Learning-Assisted Completion in settings

You can choose which FLCC suggestions are available or disable the feature by checking the appropriate box. For folks on a strict bandwidth budget, you can also change the Download Models setting to ask before downloading any model. Downloading the models you use in your everyday workflow is a breeze. Considering they’re only 100 MB, you can download one or all. Remember, they’re fine-tuned, so they’re small and efficient.

Examples of Full Line Code Completion

FLCC works based on the current file and the position of your current cursor, attempting to predict the following line. You don’t have to do anything differently regarding your current workflow and developer habits other than look for suggestions and pick the ones that work best for you.

As a usability hint, the more code in the file, the more suggestions will meet your expectations. Here’s an example in a unit testing suite. Each new Assert is predicted by using similarly-scoped tests.

Assert statement full line code completed by JetBrains Rider

FLCC can use existing patterns in your code to predict what you will do next. The context supercharges FLCC’s predictive powers, especially in opinionated codebases. A framework like ASP.NET Core MVC follows a predictable pattern and is an excellent place for predictive models to help you get to solutions faster.

Another example of full line code completion in ASP.NET MVC

As you may have noticed in the previous screenshot, the code completion key is fully customizable to your needs. Hover over the completion and select which key combination you want to use when picking a suggestion. Options include Tab, Right, Enter, Shift + Right, or a custom key combination of your choice.

Showing the full line code completion bar with optional Inline completion shortcut options

Where You Can Help

As we mentioned at the beginning of this post, these models continue to undergo fine-tuning to serve our ultimate goal: providing JetBrains Rider users with the best experience possible. Your feedback is not just important; it’s crucial. While these models can feel like magic, they ultimately work on your feedback and insights. You can download newer iterations as these models improve, boosting your productivity.

The next step for the adventurous and curious is to download the latest version of JetBrains Rider along with the relevant models and try it for yourself. While doing so, tell us what you like and what we could do better. In the section below, let us know if you have any questions or comments.

Subscribe to a monthly digest curated from the .NET Tools blog: