From 861a873f7ecf455b9c7833040b2a8163e369e062 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 25 Jul 2023 22:26:09 -0700 Subject: checkpoint. Somewhat working, just a bit slow, probably some blocking meilisearch calls still happening --- extension/src/util/messenger.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'extension/src/util/messenger.ts') diff --git a/extension/src/util/messenger.ts b/extension/src/util/messenger.ts index 3044898e..e28040f5 100644 --- a/extension/src/util/messenger.ts +++ b/extension/src/util/messenger.ts @@ -39,6 +39,7 @@ export class WebsocketMessenger extends Messenger { // var WebSocket = require("ws"); // } + console.log("Creating websocket at: ", this.serverUrl); const newWebsocket = new WebSocket(this.serverUrl); for (const listener of this.onOpenListeners) { this.onOpen(listener); @@ -105,12 +106,14 @@ export class WebsocketMessenger extends Messenger { send(messageType: string, data: object) { const payload = JSON.stringify({ messageType, data }); if (this.websocket.readyState === this.websocket.OPEN) { + console.log("websocket is open, sending message: ", messageType); this.websocket.send(payload); } else { - if (this.websocket.readyState !== this.websocket.CONNECTING) { - this.websocket = this._newWebsocket(); - } + console.log("websocket is not open, creating new websocket", messageType); + this.websocket = this._newWebsocket(); + this.websocket.addEventListener("open", () => { + console.log("websocket is open, resending message: ", messageType); this.websocket.send(payload); }); } -- cgit v1.2.3-70-g09d2 From 932925ccc90096c7869797faa00b95c8ac1eff0e Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 25 Jul 2023 23:46:34 -0700 Subject: correctly ignore directories in file context prov --- continuedev/src/continuedev/plugins/context_providers/file.py | 7 +++++-- extension/src/util/messenger.ts | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'extension/src/util/messenger.ts') diff --git a/continuedev/src/continuedev/plugins/context_providers/file.py b/continuedev/src/continuedev/plugins/context_providers/file.py index fc0af7ba..6222ec6a 100644 --- a/continuedev/src/continuedev/plugins/context_providers/file.py +++ b/continuedev/src/continuedev/plugins/context_providers/file.py @@ -21,7 +21,7 @@ class FileContextProvider(ContextProvider): title = "file" workspace_dir: str - ignore_patterns: List[str] = list(map(lambda folder: f"**/{folder}", [ + ignore_patterns: List[str] = [ ".git", ".vscode", ".idea", @@ -35,7 +35,10 @@ class FileContextProvider(ContextProvider): "target", "out", "bin", - ])) + ".pytest_cache", + ".vscode-test", + ".continue", + ] async def provide_context_items(self) -> List[ContextItem]: filepaths = [] diff --git a/extension/src/util/messenger.ts b/extension/src/util/messenger.ts index e28040f5..be4233b2 100644 --- a/extension/src/util/messenger.ts +++ b/extension/src/util/messenger.ts @@ -106,14 +106,11 @@ export class WebsocketMessenger extends Messenger { send(messageType: string, data: object) { const payload = JSON.stringify({ messageType, data }); if (this.websocket.readyState === this.websocket.OPEN) { - console.log("websocket is open, sending message: ", messageType); this.websocket.send(payload); } else { - console.log("websocket is not open, creating new websocket", messageType); this.websocket = this._newWebsocket(); this.websocket.addEventListener("open", () => { - console.log("websocket is open, resending message: ", messageType); this.websocket.send(payload); }); } -- cgit v1.2.3-70-g09d2 From 03da423e5abdf32c5bf9755ffd2e1c7be98e6454 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 25 Jul 2023 23:51:55 -0700 Subject: messenger don't create new websocket if connecting --- extension/src/util/messenger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'extension/src/util/messenger.ts') diff --git a/extension/src/util/messenger.ts b/extension/src/util/messenger.ts index be4233b2..dc59a593 100644 --- a/extension/src/util/messenger.ts +++ b/extension/src/util/messenger.ts @@ -108,7 +108,9 @@ export class WebsocketMessenger extends Messenger { if (this.websocket.readyState === this.websocket.OPEN) { this.websocket.send(payload); } else { - this.websocket = this._newWebsocket(); + if (this.websocket.readyState !== this.websocket.CONNECTING) { + this.websocket = this._newWebsocket(); + } this.websocket.addEventListener("open", () => { this.websocket.send(payload); -- cgit v1.2.3-70-g09d2