diff options
-rw-r--r-- | continuedev/src/continuedev/server/ide.py | 21 | ||||
-rw-r--r-- | continuedev/src/continuedev/server/meilisearch_server.py | 7 | ||||
-rw-r--r-- | continuedev/src/continuedev/server/session_manager.py | 4 | ||||
-rw-r--r-- | docs/docs/troubleshooting.md | 4 | ||||
-rw-r--r-- | extension/react-app/src/components/Loader.tsx | 1 |
5 files changed, 26 insertions, 11 deletions
diff --git a/continuedev/src/continuedev/server/ide.py b/continuedev/src/continuedev/server/ide.py index 89fcd0d1..1c88d2a0 100644 --- a/continuedev/src/continuedev/server/ide.py +++ b/continuedev/src/continuedev/server/ide.py @@ -185,13 +185,20 @@ class IdeProtocolServer(AbstractIdeProtocolServer): return other_msgs async def _send_json(self, message_type: str, data: Any): - if self.websocket.application_state == WebSocketState.DISCONNECTED: - logger.debug( - f"Tried to send message, but websocket is disconnected: {message_type}" - ) - return - logger.debug(f"Sending IDE message: {message_type}") - await self.websocket.send_json({"messageType": message_type, "data": data}) + # TODO: You breakpointed here, set it to disconnected, and then saw + # that even after reloading, it couldn't connect the server. + # Is this because there is an IDE registered without a websocket? + # This shouldn't count as registered in that case. + try: + if self.websocket.application_state == WebSocketState.DISCONNECTED: + logger.debug( + f"Tried to send message, but websocket is disconnected: {message_type}" + ) + return + logger.debug(f"Sending IDE message: {message_type}") + await self.websocket.send_json({"messageType": message_type, "data": data}) + except RuntimeError as e: + logger.warning(f"Error sending IDE message, websocket probably closed: {e}") async def _receive_json(self, message_type: str, timeout: int = 20) -> Any: try: diff --git a/continuedev/src/continuedev/server/meilisearch_server.py b/continuedev/src/continuedev/server/meilisearch_server.py index e64588e7..11099494 100644 --- a/continuedev/src/continuedev/server/meilisearch_server.py +++ b/continuedev/src/continuedev/server/meilisearch_server.py @@ -69,10 +69,13 @@ async def ensure_meilisearch_installed() -> bool: else: non_existing_paths.add(path) - if len(non_existing_paths) > 0 and os.name != "nt": + if len(non_existing_paths) > 0: # Clear the meilisearch binary if meilisearchPath in existing_paths: - os.remove(meilisearchPath) + try: + os.remove(meilisearchPath) + except: + pass existing_paths.remove(meilisearchPath) # Clear the existing directories diff --git a/continuedev/src/continuedev/server/session_manager.py b/continuedev/src/continuedev/server/session_manager.py index 05b54c89..aea20ef9 100644 --- a/continuedev/src/continuedev/server/session_manager.py +++ b/continuedev/src/continuedev/server/session_manager.py @@ -159,9 +159,9 @@ class SessionManager: async def send_ws_data(self, session_id: str, message_type: str, data: Any): if session_id not in self.sessions: - raise SessionNotFound(f"Session {session_id} not found") + logger.warning(f"Session {session_id} not found") + return if self.sessions[session_id].ws is None: - # logger.debug(f"Session {session_id} has no websocket") return await self.sessions[session_id].ws.send_json( diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md index 70dec2bf..722c5d1b 100644 --- a/docs/docs/troubleshooting.md +++ b/docs/docs/troubleshooting.md @@ -50,6 +50,10 @@ If your Continue server is not setting up, try checking the console logs: 3. Select `Console` 4. Read the console logs +## Download an Older Version + +If you've tried everything, reported an error, and are waiting to hear back, you can try downloading an older version of the extension. All versions are hosted on the Open VSX Registry [here](https://open-vsx.org/extension/Continue/continue). Once you've downloaded the extension, which will be a .vsix file, you can install it manually by following the instructions [here](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix). + ## Still having trouble? Create a GitHub issue [here](https://github.com/continuedev/continue/issues/new?assignees=&labels=bug&projects=&template=bug-report-%F0%9F%90%9B.md&title=), leaving the details of your problem, and we'll be able to more quickly help you out. diff --git a/extension/react-app/src/components/Loader.tsx b/extension/react-app/src/components/Loader.tsx index 3bf10b1e..55f4f31f 100644 --- a/extension/react-app/src/components/Loader.tsx +++ b/extension/react-app/src/components/Loader.tsx @@ -6,6 +6,7 @@ import { PlayIcon } from "@heroicons/react/24/outline"; const DEFAULT_SIZE = "28px"; const FlashingDiv = styled.div` + margin-top: 16px; margin: auto; width: ${DEFAULT_SIZE}; animation: flash 1.2s infinite ease-in-out; |