2 Star 0 Fork 0

mirrors_microsoft/vs-intellicode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Automate code completions tailored to your codebase with IntelliCode Team completions

Visual Studio IntelliCode saves you time by putting what you’re most likely to use at the top of your completion list. IntelliCode recommendations are based on thousands of open source projects on GitHub each with over 100 stars. When combined with the context of your code, the completion list is tailored to promote common practices. To get IntelliCode's starred completion suggestions for your own types, or other types not commonly found in open source, use IntelliCode Team completions.

With this GitHub Action, you can keep your Team completion suggestions up-to-date with your repository’s latest commit by automating the Team completions model training.

Requirements

  • The build agent (MSBUILD, CMAKE) has the minimum required Visual Studio version installed: For C# repositories: Visual Studio 2017 or higher For C++ repositories: Visual Studio 2019 Update 4 or higher.
  • A full clone of a repository: If you are using checkout@v2 or higher you need to specify a fetch-depth of 0 to fetch the complete repository.

Usage

The workflow is usually declared in .github/workflows/intellicode.yml.

  • Here's what a C# workflow looks like:
name: Main IntelliCode Workflow

on:
  push:
    branches: 
      - main # IntelliCode recommends training on main branch to increase your model availability. Switch to another branch if you'd like to reduce update frequency.

jobs:
  build:
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2 #Checkout v2 by default fetches just a shallow clone of the repository (latest changes).
      with:
        fetch-depth: 0 # If you are using v2 We need to override the fetch-depth to fetch the entire codebase for code analysis.
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: <Your_Build_Version>
    - name: Build with dotnet
      run: dotnet build --configuration Release # Project needs to build before training a model.
 - name: Train Intellicode Model
      uses: microsoft/vs-intellicode@v1

NOTE: Training a C# model usually takes around the same time it takes to build the project. It depends entirely on the length of the codebase.

Inputs

Name Type Description
directory string (optional) Use if you wish to override the directory where the repo to be trained is located at.
platform string (optional) Only for C++ repositories. Sets the platform for the C++ build (ARM, Any CPU, etc).
config string (optional) Only for C++ repositories. Sets the configuration for the C++ build (Debug, Release).

Troubleshooting and Feedback

Having trouble running the Github Action? If you are having issues with running the IntelliCode GitHub Action or would like to provide feedback, let the IntelliCode team know on the IntelliCode GitHub issues community forum . If you reproduce the problem before submitting your issue, please attach images and/or gifs to the issue to facilitate our investigations. Be sure to tag your issue with the tag feedback or issue.

Not seeing any IntelliCode completions in Visual Studio? If you are not able to see any IntelliCode completions, you may have extensions installed that are overriding the IntelliSense UI. This can prevent the IntelliCode "starred" suggestions from appearing at the top of the list. You can verify if extensions are causing this behavior by turning them off and then trying IntelliSense again. Or, if the extension supports it, turn off its auto-completion features.

To report an IntelliCode` for Visual Studio bug, use the Help > Send Feedback > Report a Problem menu. If you reproduce the problem before submitting the report, logs are automatically included in the report.

Do you have suggestions on how we can make our product better?

For feature requests or suggestions click the Send feedback about > This product button at the bottom of this page to log a new issue. Mention that it's a feature request.

See also

Supported build configurations

  • Your code is built with MSBUILD
  • Your code is built with CMAKE for native C++ code

License

The files and documentation in this project are released under the MIT License.

MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

简介

暂无描述 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_microsoft/vs-intellicode.git
git@gitee.com:mirrors_microsoft/vs-intellicode.git
mirrors_microsoft
vs-intellicode
vs-intellicode
main

搜索帮助