Skip to content

Commit

Permalink
Cleaning and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Oct 29, 2024
1 parent f63cce0 commit 9f2f249
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
14 changes: 0 additions & 14 deletions schema/inline-provider.json

This file was deleted.

5 changes: 1 addition & 4 deletions schema/llm-provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
"title": "The LLM provider",
"description": "The LLM provider to use for chat and completion",
"default": "None",
"enum": [
"None",
"MistralAI"
]
"enum": ["None", "MistralAI"]
},
"apiKey": {
"type": "string",
Expand Down
7 changes: 2 additions & 5 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,15 @@ export class LlmProvider implements ILlmProvider {
}

setProvider(name: string | null, settings: ReadonlyPartialJSONObject) {
console.log('SET PROVIDER', name);
if (name === null) {
// TODO: the inline completion is not disabled, it should be removed/disabled
// from the manager.
// TODO: the inline completion is not disabled.
// It should be removed/disabled from the manager.
this._providerChange.emit();
return;
}

const providers = this._completionProviders.get(name);
if (providers !== undefined) {
console.log('Provider defined');
// Update the inline completion provider settings.
this._updateConfig(providers.completionProvider.client, settings);

Expand All @@ -58,7 +56,6 @@ export class LlmProvider implements ILlmProvider {
}
return;
}
console.log('Provider undefined');
if (name === 'MistralAI') {
this._name = 'MistralAI';
const mistralClient = new MistralAI({ apiKey: 'TMP' });
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4887,6 +4887,7 @@ __metadata:
"@langchain/mistralai": ^0.1.1
"@lumino/coreutils": ^2.1.2
"@lumino/polling": ^2.1.2
"@lumino/signaling": ^2.1.2
"@types/json-schema": ^7.0.11
"@types/react": ^18.0.26
"@types/react-addons-linked-state-mixin": ^0.14.22
Expand Down

0 comments on commit 9f2f249

Please sign in to comment.