Skip to content

Commit

Permalink
Remove dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Jun 26, 2024
1 parent c73aab4 commit 1576c06
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@ pip install jupyterlab-codeium

![Enter Token](./img/2-api-key.png)

7. Start JupyterLab. At first launch you should see the following dialog:

![Enter API Key](./img/3-jupyterlab-dialog.png)

8. Go to the settings to paste the API key:
7. Go to the settings to paste the API key:

![Settings](./img/4-jupyterlab-settings.png)

9. You should now be able to use the extension. Open a Python file and start typing to see the completions.
8. You should now be able to use the extension. Open a Python file and start typing to see the completions.

![Completions](./img/5-example.png)

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"@connectrpc/connect": "^1.4.0",
"@connectrpc/connect-web": "^1.4.0",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
"@jupyterlab/codemirror": "^4.0.0",
"@jupyterlab/completer": "^4.0.0",
"@jupyterlab/settingregistry": "^4.0.0",
Expand Down
11 changes: 0 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
JupyterFrontEnd,
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import { Dialog, showDialog } from '@jupyterlab/apputils';
import { IEditorLanguageRegistry } from '@jupyterlab/codemirror';
import { ICompletionProviderManager } from '@jupyterlab/completer';
import { ISettingRegistry } from '@jupyterlab/settingregistry';
Expand Down Expand Up @@ -31,16 +30,6 @@ const plugin: JupyterFrontEndPlugin<void> = {
const updateKey = () => {
const apiKey = settings.get('apiKey').composite as string;
provider.apiKey = apiKey;

if (!apiKey) {
const message = 'Codeium API key is not set';
console.warn(message);
void showDialog({
title: message,
body: 'Please set the Codeium API key in the settings editor',
buttons: [Dialog.okButton()]
});
}
};

settings.changed.connect(() => updateKey());
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ __metadata:
languageName: node
linkType: hard

"@jupyterlab/apputils@npm:^4.0.0, @jupyterlab/apputils@npm:^4.3.1":
"@jupyterlab/apputils@npm:^4.3.1":
version: 4.3.1
resolution: "@jupyterlab/apputils@npm:4.3.1"
dependencies:
Expand Down Expand Up @@ -3974,7 +3974,6 @@ __metadata:
"@connectrpc/connect": ^1.4.0
"@connectrpc/connect-web": ^1.4.0
"@jupyterlab/application": ^4.0.0
"@jupyterlab/apputils": ^4.0.0
"@jupyterlab/builder": ^4.0.0
"@jupyterlab/codemirror": ^4.0.0
"@jupyterlab/completer": ^4.0.0
Expand Down

0 comments on commit 1576c06

Please sign in to comment.