-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Supports AI Controls for GK Organizations #4338
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
Conversation
7939a2c
to
c383877
Compare
c383877
to
5659804
Compare
5659804
to
4c0d9f0
Compare
4c0d9f0
to
427fe47
Compare
427fe47
to
c0b330f
Compare
c0b330f
to
f3ba0b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just one issue I noticed. This will need heavy testing once merged.
src/plus/ai/aiProviderService.ts
Outdated
if (isProviderEnabledByOrg('vscode', orgAiConf)) { | ||
const vsCodeModels = await this.getModels('vscode'); | ||
if (vsCodeModels.length !== 0) { | ||
chosenProviderId = 'vscode'; | ||
} | ||
} else if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This nested if
statement changes the previous logic such that if we do not find a vscode model, it does not move to the else
block and therefore does not choose the GK model. I suggest moving the existing vscode models check into the if
statement to make sure that the original flow is preserved.
i.e.
if (isProviderEnabledByOrg('vscode', orgAiConf)) { | |
const vsCodeModels = await this.getModels('vscode'); | |
if (vsCodeModels.length !== 0) { | |
chosenProviderId = 'vscode'; | |
} | |
} else if ( | |
const vsCodeModels = await this.getModels('vscode'); | |
if (isProviderEnabledByOrg('vscode', orgAiConf) && vsCodeModels.length !== 0) { | |
chosenProviderId = 'vscode'; | |
} else if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@axosoft-ramint
Agree. Fixed.
f3ba0b2
to
1e7655d
Compare
Description
Support AI Controls for GK Organizations. Fixes #4300
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses