Giter Site home page Giter Site logo

vs-intellicode's Introduction

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.

vs-intellicode's People

Contributors

dependabot[bot] avatar microsoft-github-operations[bot] avatar microsoftopensource avatar osobeso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vs-intellicode's Issues

Unable to download from the marketplace

Using Visual Studio 2017 professional as that is the newest licence we have, and have been issued with a new laptop and would like install IntelliCode again, but cannot find it anywhere to download or install.

Searching within Visual Studio does not find it, also searching the marketplace does not find it.

The link in the README.md here, and from various Google searched this page, but the extension is not there.
https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.VSIntelliCode

How can I get this to install again?
Many thanks,
Mike

Clarify documentation for config/platform inputs

Currently, it appears like both the config and platform inputs must be set, in order to customize either of them. Is that actually necessary? (e.g. would it make sense to just override the config or platform, but not both?). If so, it might be helpful to update the readme to call out this dependency.

Additionally, both inputs are called out as optional, but we don't specify what the default value is. If someone is building a C++ project, is the config/platform inferred from the project/build configuration in the codebase itself? If so, it might be helpful to call that out.

Does IntelliCode extension send data to Microsoft?

Hi to everyone, I'm opening this issue in order to understand if the IntelliCode extension for Visual Studio Code usually sends data to Microsoft about the source code.
I'm not worrying about any log sent to Microsoft for statistical reasons, I only want to know if I can use this extension to work for enterprise projects that are proprietary and I don't want to have a penalty from the company for which I'm actually working, because we, as employees, can't share our private source code.
So, in summary, does this extension send part of the code or the whole source code to Microsoft or to anyone who is actually training the machine learning model of IntelliCode? Thank you so much

Error in Log file but Task Completes when Executing in Github Actions:

When executing in GitHub Actions, I get the following warning, however the task completes.
image

Run microsoft/vs-intellicode@v1
 with:
 env:
   DOTNET_ROOT: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet
D:\a\_actions\microsoft\vs-intellicode\v1\dist\CLI\intellicode.exe train --directory D:\a\msgraph-sdk-raptor\msgraph-sdk-raptor --anonymous --verbosity n --user-agent GitHub
CLI Information: 0 : IntelliCode CLI Version 1.1.241.30581
CLI Warning: 0 : The 'CSharp' analyzer was not able to collect data from the codebase.
[]
(node:4644) UnhandledPromiseRejectionWarning: Error: The process 'D:\a\_actions\microsoft\vs-intellicode\v1\dist\CLI\intellicode.exe' failed with exit code 1
   at ExecState._setResult (D:\a\_actions\microsoft\vs-intellicode\v1\dist\index.js:920:25)
   at ExecState.CheckComplete (D:\a\_actions\microsoft\vs-intellicode\v1\dist\index.js:903:18)
   at ChildProcess.<anonymous> (D:\a\_actions\microsoft\vs-intellicode\v1\dist\index.js:797:27)
   at ChildProcess.emit (events.js:210:5)
   at maybeClose (internal/child_process.js:1021:16)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:4644) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4644) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Planning to upgrade logo on GitHub Marketplace to Microsoft logo by end of May 2021

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.