summaryrefslogtreecommitdiff
path: root/extension/react-app/src/App.tsx
blob: 8785f88f8a9e25687376a9944743dda2982e27ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import DebugPanel from "./components/DebugPanel";
import MainTab from "./tabs/main";
import WelcomeTab from "./tabs/welcome";
import ChatTab from "./tabs/chat";
import GUI from "./tabs/gui";
import { createContext } from "react";
import useContinueGUIProtocol from "./hooks/useWebsocket";
import ContinueGUIClientProtocol from "./hooks/useContinueGUIProtocol";

export const GUIClientContext = createContext<
  ContinueGUIClientProtocol | undefined
>(undefined);

function App() {
  const client = useContinueGUIProtocol();

  return (
    <GUIClientContext.Provider value={client}>
      <DebugPanel
        tabs={[
          {
            element: <GUI />,
            title: "GUI",
          },
          // { element: <MainTab />, title: "Debug Panel" },
          // { element: <WelcomeTab />, title: "Welcome" },
          // { element: <ChatTab />, title: "Chat" },
        ]}
      />
    </GUIClientContext.Provider>
  );
}

export default App;