Skip to content

Commit c60ccfa

Browse files
committed
Fix typos in Mistral endpoint and improve user feedback during file generation
Signed-off-by: kshitij79 <[email protected]>
1 parent 664ab50 commit c60ccfa

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

client/src/copilot/generators/suggestionProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export async function getSuggestion(client: LanguageClient, documents: Documents
1919
case 'openai':
2020
apiUrl = DEFAULT_LLM_ENDPOINTS.OPENAI;
2121
break;
22-
case 'mistralai':
22+
case 'mistral':
2323
apiUrl = DEFAULT_LLM_ENDPOINTS.MISTRALAI;
2424
break;
2525
default:

client/src/copilot/modelGeneratorWizard/modelGeneratorPanel.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,23 @@ export function createFileGeneratorPanel(context: vscode.ExtensionContext, clien
5353
try {
5454
await generateGrammarFile(client, message.filePath);
5555
updateGeneratingState('grammar', false);
56+
vscode.window.showInformationMessage('Grammar file generated successfully');
5657
} catch (error) {
5758
log(`Error generating grammar file: ${error.message}`);
5859
updateGeneratingState('grammar', false, error.message);
60+
vscode.window.showErrorMessage('Error generating grammar file');
5961
}
6062
break;
6163
case FILE_GENERATORS.GENERATE_MODEL_FILE:
6264
updateGeneratingState('model', true);
6365
try {
6466
await generateModelFile(client, message.packageFile, message.grammarFile);
6567
updateGeneratingState('model', false);
68+
vscode.window.showInformationMessage('Model file generated successfully');
6669
} catch (error) {
6770
log(`Error generating model file: ${error.message}`);
6871
updateGeneratingState('model', false, error.message);
72+
vscode.window.showErrorMessage('Error generating model file');
6973
}
7074
break;
7175
case FILE_GENERATORS.REQUEST_FILE_LIST:

client/src/copilot/utils/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const DEFAULT_LLM_MODELS = {
8787
export const DEFAULT_LLM_ENDPOINTS = {
8888
GEMINI: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent',
8989
OPENAI: 'https://api.openai.com/v1/chat/completions',
90-
MISTRALAI: 'https://api.mistralai.com/v1/chat/completions'
90+
MISTRALAI: 'https://api.mistral.ai/v1/chat/completions'
9191
};
9292

9393
// Constants for Panel Manager

0 commit comments

Comments
 (0)