Merge pull request #3243 from continuedev/dallin/remove-monaco
Remove monaco pages in GUI
This commit is contained in:
commit
e564b60c52
5 changed files with 0 additions and 152 deletions
36
gui/package-lock.json
generated
36
gui/package-lock.json
generated
|
|
@ -9,7 +9,6 @@
|
|||
"dependencies": {
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@monaco-editor/react": "^4.6.0",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
"@tiptap/core": "^2.3.2",
|
||||
"@tiptap/extension-document": "^2.3.2",
|
||||
|
|
@ -1336,30 +1335,6 @@
|
|||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@monaco-editor/loader": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@monaco-editor/loader/-/loader-1.4.0.tgz",
|
||||
"integrity": "sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==",
|
||||
"dependencies": {
|
||||
"state-local": "^1.0.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"monaco-editor": ">= 0.21.0 < 1"
|
||||
}
|
||||
},
|
||||
"node_modules/@monaco-editor/react": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@monaco-editor/react/-/react-4.6.0.tgz",
|
||||
"integrity": "sha512-RFkU9/i7cN2bsq/iTkurMWOEErmYcY6JiQI3Jn+WeR/FGISH8JbHERjpS9oRuSOPvDMJI0Z8nJeKkbOs9sBYQw==",
|
||||
"dependencies": {
|
||||
"@monaco-editor/loader": "^1.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"monaco-editor": ">= 0.25.0 < 1",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/nice": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/nice/-/nice-1.0.1.tgz",
|
||||
|
|
@ -8871,12 +8846,6 @@
|
|||
"resolved": "https://registry.npmjs.org/minisearch/-/minisearch-7.1.0.tgz",
|
||||
"integrity": "sha512-tv7c/uefWdEhcu6hvrfTihflgeEi2tN6VV7HJnCjK6VxM75QQJh4t9FwJCsA2EsRS8LCnu3W87CuGPWMocOLCA=="
|
||||
},
|
||||
"node_modules/monaco-editor": {
|
||||
"version": "0.52.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.0.tgz",
|
||||
"integrity": "sha512-OeWhNpABLCeTqubfqLMXGsqf6OmPU6pHM85kF3dhy6kq5hnhuVS1p3VrEW/XhWHc71P2tHyS5JFySD8mgs1crw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/mrmime": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz",
|
||||
|
|
@ -11435,11 +11404,6 @@
|
|||
"integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/state-local": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz",
|
||||
"integrity": "sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w=="
|
||||
},
|
||||
"node_modules/std-env": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
"dependencies": {
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@monaco-editor/react": "^4.6.0",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
"@tiptap/core": "^2.3.2",
|
||||
"@tiptap/extension-document": "^2.3.2",
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import ErrorPage from "./pages/error";
|
|||
import Chat from "./pages/gui";
|
||||
import History from "./pages/history";
|
||||
import MigrationPage from "./pages/migration";
|
||||
import MonacoPage from "./pages/monaco";
|
||||
import MorePage from "./pages/More";
|
||||
import Stats from "./pages/stats";
|
||||
import { ROUTES } from "./util/navigation";
|
||||
|
|
@ -53,10 +52,6 @@ const router = createMemoryRouter([
|
|||
path: ROUTES.CONFIG_ERROR,
|
||||
element: <ConfigErrorPage />,
|
||||
},
|
||||
{
|
||||
path: "/monaco",
|
||||
element: <MonacoPage />,
|
||||
},
|
||||
{
|
||||
path: "/migration",
|
||||
element: <MigrationPage />,
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
.monaco-editor .margin {
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
import { CheckIcon, XMarkIcon } from "@heroicons/react/24/outline";
|
||||
import { DiffEditor } from "@monaco-editor/react";
|
||||
import React, { useContext, useEffect } from "react";
|
||||
import { v4 } from "uuid";
|
||||
import { vscInputBackground } from "../components";
|
||||
import HeaderButtonWithToolTip from "../components/gui/HeaderButtonWithToolTip";
|
||||
import { IdeMessengerContext } from "../context/IdeMessenger";
|
||||
|
||||
interface EditorFrameProps {
|
||||
filename: string;
|
||||
}
|
||||
|
||||
function EditorFrame(props: EditorFrameProps) {
|
||||
const [contents, setContents] = React.useState(
|
||||
"function sum(a, b) {return a + b;}",
|
||||
);
|
||||
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
useEffect(() => {
|
||||
const messageId = v4();
|
||||
const eventListener = (event: any) => {
|
||||
if (
|
||||
event.data.messageId === messageId &&
|
||||
event.data.type === "readRangeInFile"
|
||||
) {
|
||||
setContents(event.data.contents);
|
||||
}
|
||||
};
|
||||
window.addEventListener("message", eventListener);
|
||||
|
||||
ideMessenger.post("readFile", { filepath: props.filename });
|
||||
|
||||
return () => window.removeEventListener("message", eventListener);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
className="my-2 flex items-center justify-between px-2 py-1"
|
||||
style={{
|
||||
backgroundColor: vscInputBackground,
|
||||
}}
|
||||
>
|
||||
<code
|
||||
className="cursor-pointer"
|
||||
onClick={() => {
|
||||
ideMessenger.post("showFile", {
|
||||
filepath: props.filename,
|
||||
});
|
||||
}}
|
||||
>
|
||||
{props.filename.split("/").pop()}
|
||||
</code>
|
||||
<div className="flex items-center">
|
||||
<HeaderButtonWithToolTip text="Reject" onClick={() => {}}>
|
||||
<XMarkIcon width="1.3em" height="1.3em" color="red" />
|
||||
</HeaderButtonWithToolTip>
|
||||
<HeaderButtonWithToolTip text="Accept" onClick={() => {}}>
|
||||
<CheckIcon width="1.3em" height="1.3em" color="lightgreen" />
|
||||
</HeaderButtonWithToolTip>
|
||||
</div>
|
||||
</div>
|
||||
{/* <Editor
|
||||
className="border-gray-600 border border-solid rounded-md overflow-visible p-1 max-w-3xl"
|
||||
height="90px"
|
||||
width="90vw"
|
||||
defaultLanguage="typescript"
|
||||
defaultValue={contents}
|
||||
options={{ theme: "vs-dark", minimap: { enabled: false } }}
|
||||
/> */}
|
||||
<DiffEditor
|
||||
theme="vs-dark"
|
||||
className="overflow-visible p-1"
|
||||
height="90px"
|
||||
options={{
|
||||
minimap: { enabled: false },
|
||||
readOnly: false,
|
||||
scrollbar: {
|
||||
vertical: "hidden",
|
||||
},
|
||||
}}
|
||||
original={contents}
|
||||
modified="function sum(a, b) {return d + c;}"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const FILENAMES = [
|
||||
"/Users/natesesti/Desktop/continue/gui/src/hooks/CustomPostHogProvider.tsx",
|
||||
"/Users/natesesti/Desktop/continue/gui/src/hooks/CustomPostHogProvider.tsx",
|
||||
"/Users/natesesti/Desktop/continue/gui/src/hooks/CustomPostHogProvider.tsx",
|
||||
];
|
||||
|
||||
function MonacoPage() {
|
||||
return (
|
||||
<div>
|
||||
<h1 className="px-4">Multi-File Edit</h1>
|
||||
{FILENAMES.map((filename) => {
|
||||
return <EditorFrame filename={filename} />;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default MonacoPage;
|
||||
Loading…
Add table
Reference in a new issue