From a328d3671529935929ade8c0ca28ccb465699f8e Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Thu, 15 Jun 2023 18:22:35 -0700
Subject: hover icons for description

---
 .../src/components/HeaderButtonWithText.tsx        | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 extension/react-app/src/components/HeaderButtonWithText.tsx

(limited to 'extension/react-app/src/components/HeaderButtonWithText.tsx')

diff --git a/extension/react-app/src/components/HeaderButtonWithText.tsx b/extension/react-app/src/components/HeaderButtonWithText.tsx
new file mode 100644
index 00000000..d70a3d70
--- /dev/null
+++ b/extension/react-app/src/components/HeaderButtonWithText.tsx
@@ -0,0 +1,26 @@
+import React, { useState } from "react";
+
+import { HeaderButton } from ".";
+
+interface HeaderButtonWithTextProps {
+  text: string;
+  onClick?: (e: any) => void;
+  children: React.ReactNode;
+}
+
+const HeaderButtonWithText = (props: HeaderButtonWithTextProps) => {
+  const [hover, setHover] = useState(false);
+  return (
+    <HeaderButton
+      style={{ padding: "3px" }}
+      onMouseEnter={() => setHover(true)}
+      onMouseLeave={() => setHover(false)}
+      onClick={props.onClick}
+    >
+      <span hidden={!hover}>{props.text}</span>
+      {props.children}
+    </HeaderButton>
+  );
+};
+
+export default HeaderButtonWithText;
-- 
cgit v1.2.3-70-g09d2


From 472984ab63461b90cf41b645e49bcc95bdf2ef1e Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Fri, 16 Jun 2023 15:17:36 -0700
Subject: fixes

---
 continuedev/src/continuedev/libs/llm/proxy_server.py        | 7 +++++--
 continuedev/src/continuedev/server/ide.py                   | 2 +-
 extension/react-app/src/components/HeaderButtonWithText.tsx | 6 +++++-
 extension/react-app/src/components/index.ts                 | 2 +-
 4 files changed, 12 insertions(+), 5 deletions(-)

(limited to 'extension/react-app/src/components/HeaderButtonWithText.tsx')

diff --git a/continuedev/src/continuedev/libs/llm/proxy_server.py b/continuedev/src/continuedev/libs/llm/proxy_server.py
index 4227042f..93f2d48a 100644
--- a/continuedev/src/continuedev/libs/llm/proxy_server.py
+++ b/continuedev/src/continuedev/libs/llm/proxy_server.py
@@ -17,7 +17,7 @@ CHAT_MODELS = {
     "gpt-3.5-turbo", "gpt-4"
 }
 
-# SERVER_URL = "http://127.0.0.1:8002"
+# SERVER_URL = "http://127.0.0.1:8080"
 SERVER_URL = "https://proxy-server-l6vsfbzhba-uc.a.run.app"
 
 
@@ -87,4 +87,7 @@ class ProxyServer(LLM):
             }) as resp:
                 async for line in resp.content:
                     if line:
-                        yield line.decode("utf-8")
+                        try:
+                            yield line.decode("utf-8")
+                        except json.JSONDecodeError:
+                            raise Exception(str(line))
diff --git a/continuedev/src/continuedev/server/ide.py b/continuedev/src/continuedev/server/ide.py
index c66cc142..c83fbc8a 100644
--- a/continuedev/src/continuedev/server/ide.py
+++ b/continuedev/src/continuedev/server/ide.py
@@ -230,7 +230,7 @@ class IdeProtocolServer(AbstractIdeProtocolServer):
         resp = await self._send_and_receive_json({}, UniqueIdResponse, "uniqueId")
         return resp.uniqueId
 
-    @cached_property
+    @property
     def workspace_directory(self) -> str:
         return asyncio.run(self.getWorkspaceDirectory())
 
diff --git a/extension/react-app/src/components/HeaderButtonWithText.tsx b/extension/react-app/src/components/HeaderButtonWithText.tsx
index d70a3d70..c4f22211 100644
--- a/extension/react-app/src/components/HeaderButtonWithText.tsx
+++ b/extension/react-app/src/components/HeaderButtonWithText.tsx
@@ -14,7 +14,11 @@ const HeaderButtonWithText = (props: HeaderButtonWithTextProps) => {
     <HeaderButton
       style={{ padding: "3px" }}
       onMouseEnter={() => setHover(true)}
-      onMouseLeave={() => setHover(false)}
+      onMouseLeave={() => {
+        setTimeout(() => {
+          setHover(false);
+        }, 100);
+      }}
       onClick={props.onClick}
     >
       <span hidden={!hover}>{props.text}</span>
diff --git a/extension/react-app/src/components/index.ts b/extension/react-app/src/components/index.ts
index 525989af..d99b4d96 100644
--- a/extension/react-app/src/components/index.ts
+++ b/extension/react-app/src/components/index.ts
@@ -48,7 +48,7 @@ export const Pre = styled.pre`
   max-height: 150px;
   overflow-y: scroll;
   margin: 0;
-  background-color: ${secondaryDark};
+  background-color: ${vscBackground};
   border: none;
 
   /* text wrapping */
-- 
cgit v1.2.3-70-g09d2

