Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Compiler Argument Trait AB Experiment #12979

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kuchungmsft
Copy link
Contributor

@kuchungmsft kuchungmsft commented Nov 19, 2024

  • Depends on cpptools' update to provide ProjectContextResult.
  • Added the following new traits
    • intellisense: compiler information disclaimer.
    • intellisenseBegin: to note the begin of IntelliSense information.
    • compilerArguments: a list of compiler command arguments that could affect Copilot generating completions.
    • directAsks: direct asking Copilot to do something instead of providing an argument.
    • intellisenseEnd: to note the end of IntelliSense information.
  • A/B Experimental flags
    • copilotcppTraits: boolean flag to enable cpp traits
    • copilotcppExcludeTraits: string array to exclude individual trait, i.e., compilerArguments.
    • copilotcppMsvcCompilerArgumentFilter: regex string to match compiler arguments for GCC.
    • copilotcppClangCompilerArgumentFilter: regex string to match compiler arguments for Clang.
    • copilotcppGccCompilerArgumentFilter: regex string to match compiler arguments for MSVC.
    • copilotcppCompilerArgumentDirectAskMap: a stringify map string to map arguments to direct ask statements.

The traits in the following screenshot can be disabled individually via copilotcppExcludeTraits
image

@kuchungmsft kuchungmsft changed the title Support A/B Compiler Arguments Traits Support Compiler Argument Trait AB Experiment Nov 19, 2024
kuchungmsft added a commit to kuchungmsft/vscode-cpptools that referenced this pull request Nov 19, 2024
- Depends on microsoft#12979 to merge first.
- copilotcppMacroReferenceFilter: regex string to filter macro reference for telemetry.
- Telemetry related to user defines and macro references.
- Added new trait compilerUserDefines to note the relevant user defines to the editing file.
@kuchungmsft kuchungmsft marked this pull request as ready for review November 19, 2024 23:51
@kuchungmsft kuchungmsft force-pushed the kuchung/SupportCompilerArgumentAB branch from 92e251b to ce1c8fe Compare November 20, 2024 00:41
sean-mcmanus
sean-mcmanus previously approved these changes Nov 20, 2024
Copy link
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving, but I haven't been able to test it out and you should probably get another approver.

@benmcmorran
Copy link
Member

Pulling this down to test locally now and then I expect to be able to sign off.

benmcmorran
benmcmorran previously approved these changes Nov 22, 2024
Extension/src/LanguageServer/lmTool.ts Outdated Show resolved Hide resolved
Extension/src/telemetry.ts Outdated Show resolved Hide resolved
Extension/src/LanguageServer/utils.ts Outdated Show resolved Hide resolved
- Depends on cpptools' update to provide ProjectContextResult.
- Added the following new traits
  - intelliSenseDisclaimer: compiler information disclaimer.
  - intelliSenseDisclaimerBeginning: to note the beginning of IntelliSense information.
  - compilerArguments: a list of compiler command arguments that could affect Copilot generating completions.
  - directAsks: direct asking Copilot to do something instead of providing an argument.
  - intelliSenseDisclaimerEnd: to note the end of IntelliSense information.
- A/B Experimental flags
  - copilotcppTraits: boolean flag to enable cpp traits
  - copilotcppExcludeTraits: string array to exclude individual trait, i.e., compilerArguments.
  - copilotcppMsvcCompilerArgumentFilter: regex string to match compiler arguments for GCC.
  - copilotcppClangCompilerArgumentFilter: regex string to match compiler arguments for Clang.
  - copilotcppGccCompilerArgumentFilter: regex string to match compiler arguments for MSVC.
  - copilotcppCompilerArgumentDirectAskMap: a stringify map string to map arguments to direct ask statements.
Copy link
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments, but I don't know if they need to be addressed or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Pull Request
Development

Successfully merging this pull request may close these issues.

4 participants