diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/react-app/src/App.tsx | 6 | ||||
-rw-r--r-- | extension/react-app/src/hooks/ContinueGUIClientProtocol.ts (renamed from extension/react-app/src/hooks/ContinueNotebookClientProtocol.ts) | 4 | ||||
-rw-r--r-- | extension/react-app/src/hooks/useContinueGUIProtocol.ts (renamed from extension/react-app/src/hooks/useContinueNotebookProtocol.ts) | 6 | ||||
-rw-r--r-- | extension/react-app/src/hooks/useWebsocket.ts | 16 | ||||
-rw-r--r-- | extension/react-app/src/tabs/gui.tsx (renamed from extension/react-app/src/tabs/notebook.tsx) | 16 | ||||
-rw-r--r-- | extension/src/activation/activate.ts | 4 | ||||
-rw-r--r-- | extension/src/commands.ts | 4 | ||||
-rw-r--r-- | extension/src/continueIdeClient.ts | 8 |
8 files changed, 32 insertions, 32 deletions
diff --git a/extension/react-app/src/App.tsx b/extension/react-app/src/App.tsx index 0c40ced1..a51541d0 100644 --- a/extension/react-app/src/App.tsx +++ b/extension/react-app/src/App.tsx @@ -4,7 +4,7 @@ import { Provider } from "react-redux"; import store from "./redux/store"; import WelcomeTab from "./tabs/welcome"; import ChatTab from "./tabs/chat"; -import Notebook from "./tabs/notebook"; +import GUI from "./tabs/gui"; function App() { return ( @@ -13,8 +13,8 @@ function App() { <DebugPanel tabs={[ { - element: <Notebook />, - title: "Notebook", + element: <GUI />, + title: "GUI", }, // { element: <MainTab />, title: "Debug Panel" }, // { element: <WelcomeTab />, title: "Welcome" }, diff --git a/extension/react-app/src/hooks/ContinueNotebookClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts index 75fd7373..18a91de7 100644 --- a/extension/react-app/src/hooks/ContinueNotebookClientProtocol.ts +++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts @@ -1,4 +1,4 @@ -abstract class AbstractContinueNotebookClientProtocol { +abstract class AbstractContinueGUIClientProtocol { abstract sendMainInput(input: string): void; abstract reverseToIndex(index: number): void; @@ -10,4 +10,4 @@ abstract class AbstractContinueNotebookClientProtocol { abstract onStateUpdate(state: any): void; } -export default AbstractContinueNotebookClientProtocol; +export default AbstractContinueGUIClientProtocol; diff --git a/extension/react-app/src/hooks/useContinueNotebookProtocol.ts b/extension/react-app/src/hooks/useContinueGUIProtocol.ts index b785cc84..a3a1d0c9 100644 --- a/extension/react-app/src/hooks/useContinueNotebookProtocol.ts +++ b/extension/react-app/src/hooks/useContinueGUIProtocol.ts @@ -1,9 +1,9 @@ -import AbstractContinueNotebookClientProtocol from "./ContinueNotebookClientProtocol"; +import AbstractContinueGUIClientProtocol from "./ContinueGUIClientProtocol"; // import { Messenger, WebsocketMessenger } from "../../../src/util/messenger"; import { Messenger, WebsocketMessenger } from "./messenger"; import { VscodeMessenger } from "./vscodeMessenger"; -class ContinueNotebookClientProtocol extends AbstractContinueNotebookClientProtocol { +class ContinueGUIClientProtocol extends AbstractContinueGUIClientProtocol { messenger: Messenger; // Server URL must contain the session ID param serverUrlWithSessionId: string; @@ -46,4 +46,4 @@ class ContinueNotebookClientProtocol extends AbstractContinueNotebookClientProto } } -export default ContinueNotebookClientProtocol; +export default ContinueGUIClientProtocol; diff --git a/extension/react-app/src/hooks/useWebsocket.ts b/extension/react-app/src/hooks/useWebsocket.ts index 016fa17d..e762666f 100644 --- a/extension/react-app/src/hooks/useWebsocket.ts +++ b/extension/react-app/src/hooks/useWebsocket.ts @@ -1,15 +1,15 @@ import React, { useEffect, useState } from "react"; import { RootStore } from "../redux/store"; import { useSelector } from "react-redux"; -import ContinueNotebookClientProtocol from "./useContinueNotebookProtocol"; +import ContinueGUIClientProtocol from "./useContinueGUIProtocol"; import { postVscMessage } from "../vscode"; -function useContinueNotebookProtocol(useVscodeMessagePassing: boolean = true) { +function useContinueGUIProtocol(useVscodeMessagePassing: boolean = true) { const sessionId = useSelector((state: RootStore) => state.config.sessionId); const serverHttpUrl = useSelector((state: RootStore) => state.config.apiUrl); - const [client, setClient] = useState< - ContinueNotebookClientProtocol | undefined - >(undefined); + const [client, setClient] = useState<ContinueGUIClientProtocol | undefined>( + undefined + ); useEffect(() => { if (!sessionId || !serverHttpUrl) { @@ -22,12 +22,12 @@ function useContinueNotebookProtocol(useVscodeMessagePassing: boolean = true) { const serverUrlWithSessionId = serverHttpUrl.replace("http", "ws") + - "/notebook/ws?session_id=" + + "/gui/ws?session_id=" + encodeURIComponent(sessionId); console.log("Creating websocket", serverUrlWithSessionId); console.log("Using vscode message passing", useVscodeMessagePassing); - const newClient = new ContinueNotebookClientProtocol( + const newClient = new ContinueGUIClientProtocol( serverUrlWithSessionId, useVscodeMessagePassing ); @@ -36,4 +36,4 @@ function useContinueNotebookProtocol(useVscodeMessagePassing: boolean = true) { return client; } -export default useContinueNotebookProtocol; +export default useContinueGUIProtocol; diff --git a/extension/react-app/src/tabs/notebook.tsx b/extension/react-app/src/tabs/gui.tsx index 02c9ff31..5ddddbfc 100644 --- a/extension/react-app/src/tabs/notebook.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -14,9 +14,9 @@ import StepContainer from "../components/StepContainer"; import { useSelector } from "react-redux"; import { RootStore } from "../redux/store"; import useContinueWebsocket from "../hooks/useWebsocket"; -import useContinueNotebookProtocol from "../hooks/useWebsocket"; +import useContinueGUIProtocol from "../hooks/useWebsocket"; -let TopNotebookDiv = styled.div` +let TopGUIDiv = styled.div` display: grid; grid-template-columns: 1fr; `; @@ -29,11 +29,11 @@ let UserInputQueueItem = styled.div` text-align: center; `; -interface NotebookProps { +interface GUIProps { firstObservation?: any; } -function Notebook(props: NotebookProps) { +function GUI(props: GUIProps) { const [waitingForSteps, setWaitingForSteps] = useState(false); const [userInputQueue, setUserInputQueue] = useState<string[]>([]); const [history, setHistory] = useState<History | undefined>(); @@ -156,7 +156,7 @@ function Notebook(props: NotebookProps) { // } as any // ); - const client = useContinueNotebookProtocol(); + const client = useContinueGUIProtocol(); useEffect(() => { console.log("CLIENT ON STATE UPDATE: ", client, client?.onStateUpdate); @@ -207,7 +207,7 @@ function Notebook(props: NotebookProps) { // const iterations = useSelector(selectIterations); return ( - <TopNotebookDiv> + <TopGUIDiv> {typeof client === "undefined" && ( <> <Loader></Loader> @@ -258,8 +258,8 @@ function Notebook(props: NotebookProps) { }} ></MainTextInput> <ContinueButton onClick={onMainTextInput}></ContinueButton> - </TopNotebookDiv> + </TopGUIDiv> ); } -export default Notebook; +export default GUI; diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts index f8f3c65a..40def480 100644 --- a/extension/src/activation/activate.ts +++ b/extension/src/activation/activate.ts @@ -59,10 +59,10 @@ export function activateExtension( }) ), ]).then(() => { - ideProtocolClient?.openNotebook(); + ideProtocolClient?.openGUI(); }); } else { - ideProtocolClient.openNotebook().then(() => { + ideProtocolClient.openGUI().then(() => { // openCapturedTerminal(); }); } diff --git a/extension/src/commands.ts b/extension/src/commands.ts index aeeb4b4f..f0c1744b 100644 --- a/extension/src/commands.ts +++ b/extension/src/commands.ts @@ -62,11 +62,11 @@ const commandsMap: { [command: string]: (...args: any) => any } = { "continue.acceptSuggestion": acceptSuggestionCommand, "continue.rejectSuggestion": rejectSuggestionCommand, "continue.openDebugPanel": () => { - ideProtocolClient.openNotebook(); + ideProtocolClient.openGUI(); }, "continue.focusContinueInput": async () => { if (!debugPanelWebview) { - await ideProtocolClient.openNotebook(); + await ideProtocolClient.openGUI(); } debugPanelWebview?.postMessage({ type: "focusContinueInput", diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts index 477d1420..ab890801 100644 --- a/extension/src/continueIdeClient.ts +++ b/extension/src/continueIdeClient.ts @@ -97,7 +97,7 @@ class IdeProtocolClient { this.openFile(data.filepath); // TODO: Close file break; - case "openNotebook": + case "openGUI": case "connected": break; default: @@ -133,17 +133,17 @@ class IdeProtocolClient { // ------------------------------------ // // Initiate Request - closeNotebook(sessionId: string) { + closeGUI(sessionId: string) { this.panels.get(sessionId)?.dispose(); this.panels.delete(sessionId); } - async openNotebook() { + async openGUI() { console.log("OPENING NOTEBOOK"); if (this.messenger === null) { console.log("MESSENGER IS NULL"); } - const resp = await this.messenger?.sendAndReceive("openNotebook", {}); + const resp = await this.messenger?.sendAndReceive("openGUI", {}); const sessionId = resp.sessionId; console.log("SESSION ID", sessionId); |