From 96ff07418ff7d9d74cbf9e210c307f3beac0c311 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:04:49 +0000 Subject: [PATCH] Minor cleanup --- packages/jupyter-ai/src/inline-completions.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/jupyter-ai/src/inline-completions.ts b/packages/jupyter-ai/src/inline-completions.ts index b5c77e6b6..82a7e7817 100644 --- a/packages/jupyter-ai/src/inline-completions.ts +++ b/packages/jupyter-ai/src/inline-completions.ts @@ -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'; @@ -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. */ @@ -102,7 +97,6 @@ export class CompletionWebsocketHandler implements IDisposable { break; } case 'connection': { - this.id = message.client_id; this._initialized.resolve(); break; } @@ -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({ @@ -234,7 +227,7 @@ class JupyterAIInlineProvider implements IInlineCompletionProvider { } async configure(settings: { [property: string]: JSONValue }): Promise { - this._settings = settings as any as ISettings; + this._settings = settings as any as JupyterAIInlineProvider.ISettings; } /**