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

changed user information popup through vscode showInformationMessage #121

Merged

Conversation

SachinS10-lab
Copy link
Contributor

@SachinS10-lab SachinS10-lab commented Oct 30, 2024

  • Added chat model selection user information popup in configureAssistant.ts file.
  • Added welcome user information popup in setupGranitePage.ts

image
image

Comment on lines 246 to 253
// Check if we should show the Continue Onboarding message
const shouldShowContinueOnboarding = await this.shouldShowContinueOnboarding();
if (shouldShowContinueOnboarding) {
vscode.window.showInformationMessage(
`Upon launching Continue AI code Assistant, A Quickstart Popup will be displayed.
Make sure to close it before setting up IBM Granite Code Models.`,
``
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

no, this message will only be shown once configuration is done

Comment on lines 217 to 227
private async shouldShowContinueOnboarding(): Promise<boolean> {
const config = await readConfig(configFilePath);
if (!config || !config.models) {
vscode.window.showErrorMessage(`No Models Found!`);
return false;
}
return config.models.length === 1 &&
config.models[0].provider === "anthropic" &&
config.models[0].apiKey === "";
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

please delete this

public async openWizard() {
if (isContinueInstalled()) {
vscode.window.showInformationMessage(
Copy link
Collaborator

Choose a reason for hiding this comment

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

only display if mightShowContinueOnboarding returns true

Copy link
Collaborator

Choose a reason for hiding this comment

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

also, run this popup only after calling this.configureAssistant();

@@ -103,8 +103,23 @@ export class AiAssistantConfigurator {
this.apiBase = DEFAULT_API_BASE;
}

private async shouldShowContinueOnboarding(configFile: string): Promise<boolean> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename to mightShowContinueOnboarding

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed all mentioned changes and now working as expected.

When mightShowContinueOnboarding become true.

image

When mightShowContinueOnboarding become false.

image

@fbricon fbricon force-pushed the user-info-popup-chatmodel branch 2 times, most recently from 674b11f to fc63518 Compare November 5, 2024 14:05
@fbricon fbricon merged commit 9377aa0 into redhat-developer:main Nov 5, 2024
3 checks passed
@fbricon
Copy link
Collaborator

fbricon commented Nov 5, 2024

Thanks @SachinS10-lab

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

Successfully merging this pull request may close these issues.

2 participants