Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Nov 18, 2023
1 parent 68609ea commit 96ff074
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/jupyter-ai/src/inline-completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import type { ISettingRegistry } from '@jupyterlab/settingregistry';

import { IDisposable } from '@lumino/disposable';
import { PromiseDelegate } from '@lumino/coreutils';
import { JSONValue, PromiseDelegate } from '@lumino/coreutils';
import { ServerConnection } from '@jupyterlab/services';
import { URLExt } from '@jupyterlab/coreutils';
import { IEditorLanguageRegistry } from '@jupyterlab/codemirror';
Expand All @@ -28,11 +28,6 @@ export class CompletionWebsocketHandler implements IDisposable {
*/
readonly serverSettings: ServerConnection.ISettings;

/**
* ID of the connection. Requires `await initialize()`.
*/
id = '';

/**
* Create a new completion handler.
*/
Expand Down Expand Up @@ -102,7 +97,6 @@ export class CompletionWebsocketHandler implements IDisposable {
break;
}
case 'connection': {
this.id = message.client_id;
this._initialized.resolve();
break;
}
Expand Down Expand Up @@ -196,7 +190,6 @@ class JupyterAIInlineProvider implements IInlineCompletionProvider {
path = context.widget.context.path;
}
const number = ++this._counter;
console.log('request', request, context);
const mime = request.mimeType ?? 'text/plain';
const language = this.options.languageRegistry.findByMIME(mime);
const result = await this.options.completionHandler.sendMessage({
Expand Down Expand Up @@ -234,7 +227,7 @@ class JupyterAIInlineProvider implements IInlineCompletionProvider {
}

async configure(settings: { [property: string]: JSONValue }): Promise<void> {
this._settings = settings as any as ISettings;
this._settings = settings as any as JupyterAIInlineProvider.ISettings;
}

/**
Expand Down

0 comments on commit 96ff074

Please sign in to comment.