diff --git a/apps/dokploy/components/dashboard/project/ai/step-four.tsx b/apps/dokploy/components/dashboard/project/ai/step-four.tsx
index 276869f7c..e7eefbbff 100644
--- a/apps/dokploy/components/dashboard/project/ai/step-four.tsx
+++ b/apps/dokploy/components/dashboard/project/ai/step-four.tsx
@@ -1,18 +1,14 @@
import { Button } from "@/components/ui/button";
import { ScrollArea } from "@/components/ui/scroll-area";
-import dynamic from "next/dynamic";
import ReactMarkdown from "react-markdown";
+import {CodeEditor} from "@/components/shared/code-editor";
-const MonacoEditor = dynamic(() => import("@monaco-editor/react"), {
- ssr: false,
-});
-
-export function StepFour({
+export const StepFour = ({
prevStep,
templateInfo,
setOpen,
setTemplateInfo,
-}: any) {
+}: any) => {
const handleSubmit = () => {
setTemplateInfo(templateInfo); // Update the template info
setOpen(false);
@@ -40,20 +36,11 @@ export function StepFour({
diff --git a/apps/dokploy/components/dashboard/project/ai/step-one.tsx b/apps/dokploy/components/dashboard/project/ai/step-one.tsx
index 704816e2c..ece6c8de3 100644
--- a/apps/dokploy/components/dashboard/project/ai/step-one.tsx
+++ b/apps/dokploy/components/dashboard/project/ai/step-one.tsx
@@ -13,7 +13,7 @@ const examples = [
"Sendgrid service opensource analogue",
];
-export function StepOne({ nextStep, setTemplateInfo, templateInfo }: any) {
+export const StepOne = ({ nextStep, setTemplateInfo, templateInfo }: any) => {
const [userInput, setUserInput] = useState(templateInfo.userInput);
const handleNext = () => {
diff --git a/apps/dokploy/components/dashboard/project/ai/step-three.tsx b/apps/dokploy/components/dashboard/project/ai/step-three.tsx
index 8070d6854..bf13524bf 100644
--- a/apps/dokploy/components/dashboard/project/ai/step-three.tsx
+++ b/apps/dokploy/components/dashboard/project/ai/step-three.tsx
@@ -15,12 +15,12 @@ import {
import { api } from "@/utils/api";
import { useState } from "react";
-export function StepThree({
+export const StepThree = ({
nextStep,
prevStep,
templateInfo,
setTemplateInfo,
-}: any) {
+}: any) => {
const [name, setName] = useState(templateInfo.name);
const [server, setServer] = useState(templateInfo.server);
const { data: servers } = api.server.withSSHKey.useQuery();
diff --git a/apps/dokploy/components/dashboard/project/ai/step-two.tsx b/apps/dokploy/components/dashboard/project/ai/step-two.tsx
index 6e30b20e9..3550d4e70 100644
--- a/apps/dokploy/components/dashboard/project/ai/step-two.tsx
+++ b/apps/dokploy/components/dashboard/project/ai/step-two.tsx
@@ -11,14 +11,10 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import { ScrollArea } from "@/components/ui/scroll-area";
import { api } from "@/utils/api";
import { Bot, Eye, EyeOff, PlusCircle, Trash2 } from "lucide-react";
-import dynamic from "next/dynamic";
import { useEffect, useState } from "react";
import ReactMarkdown from "react-markdown";
import { toast } from "sonner";
-
-const MonacoEditor = dynamic(() => import("@monaco-editor/react"), {
- ssr: false,
-});
+import {CodeEditor} from "@/components/shared/code-editor";
interface EnvVariable {
name: string;
@@ -34,12 +30,12 @@ interface TemplateInfo {
envVariables: EnvVariable[];
}
-export function StepTwo({
+export const StepTwo = ({
nextStep,
prevStep,
templateInfo,
setTemplateInfo,
-}: any) {
+}: any) => {
const [suggestions, setSuggestions] = useState
>([]);
const [selectedVariant, setSelectedVariant] = useState("");
const [dockerCompose, setDockerCompose] = useState("");
@@ -203,26 +199,11 @@ export function StepTwo({
Docker Compose
-
-
- setDockerCompose(value as string)
- }
- options={{
- minimap: { enabled: false },
- scrollBeyondLastLine: false,
- fontSize: 14,
- lineNumbers: "on",
- readOnly: false,
- wordWrap: "on",
- automaticLayout: true,
- }}
- />
-
+ setDockerCompose(value)}
+ />
diff --git a/apps/dokploy/components/dashboard/project/ai/template-generator.tsx b/apps/dokploy/components/dashboard/project/ai/template-generator.tsx
index 9219c5d42..105e63344 100644
--- a/apps/dokploy/components/dashboard/project/ai/template-generator.tsx
+++ b/apps/dokploy/components/dashboard/project/ai/template-generator.tsx
@@ -36,7 +36,7 @@ interface Props {
projectName?: string;
}
-export function TemplateGenerator({ projectId }: Props) {
+export const TemplateGenerator = ({ projectId }: Props) => {
const [open, setOpen] = useState(false);
const [step, setStep] = useState(1);
const { data: aiSettings } = api.ai.get.useQuery();
diff --git a/apps/dokploy/components/dashboard/settings/ai-form.tsx b/apps/dokploy/components/dashboard/settings/ai-form.tsx
index 48c9dfd54..d7b6f4d6b 100644
--- a/apps/dokploy/components/dashboard/settings/ai-form.tsx
+++ b/apps/dokploy/components/dashboard/settings/ai-form.tsx
@@ -51,7 +51,7 @@ interface Model {
owned_by: string;
}
-export function AiForm() {
+export const AiForm = ()=> {
const [models, setModels] = useState([]);
const [isLoadingModels, setIsLoadingModels] = useState(false);
const [error, setError] = useState(null);
diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json
index 7f1d63313..f3f580602 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -44,7 +44,6 @@
"@dokploy/server": "workspace:*",
"@dokploy/trpc-openapi": "0.0.4",
"@hookform/resolvers": "^3.9.0",
- "@monaco-editor/react": "^4.6.0",
"@octokit/webhooks": "^13.2.7",
"@radix-ui/react-accordion": "1.1.2",
"@radix-ui/react-alert-dialog": "^1.0.5",
@@ -167,6 +166,8 @@
]
},
"commitlint": {
- "extends": ["@commitlint/config-conventional"]
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 37f03094d..5d6b8a25a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -124,9 +124,6 @@ importers:
'@hookform/resolvers':
specifier: ^3.9.0
version: 3.9.0(react-hook-form@7.52.1(react@18.2.0))
- '@monaco-editor/react':
- specifier: ^4.6.0
- version: 4.6.0(monaco-editor@0.52.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
'@octokit/webhooks':
specifier: ^13.2.7
version: 13.3.0
@@ -1782,18 +1779,6 @@ packages:
resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}
hasBin: true
- '@monaco-editor/loader@1.4.0':
- resolution: {integrity: sha512-00ioBig0x642hytVspPl7DbQyaSWRaolYie/UFNjoTdvoKPzo6xrXLhTk9ixgIKcLH5b5vDOjVNiGyY+uDCUlg==}
- peerDependencies:
- monaco-editor: '>= 0.21.0 < 1'
-
- '@monaco-editor/react@4.6.0':
- resolution: {integrity: sha512-RFkU9/i7cN2bsq/iTkurMWOEErmYcY6JiQI3Jn+WeR/FGISH8JbHERjpS9oRuSOPvDMJI0Z8nJeKkbOs9sBYQw==}
- 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
-
'@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3':
resolution: {integrity: sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==}
cpu: [arm64]
@@ -5734,9 +5719,6 @@ packages:
mlly@1.7.1:
resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==}
- monaco-editor@0.52.2:
- resolution: {integrity: sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ==}
-
ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
@@ -6745,9 +6727,6 @@ packages:
standard-as-callback@2.1.0:
resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==}
- state-local@1.0.7:
- resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==}
-
statuses@2.0.1:
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
engines: {node: '>= 0.8'}
@@ -8277,18 +8256,6 @@ snapshots:
- encoding
- supports-color
- '@monaco-editor/loader@1.4.0(monaco-editor@0.52.2)':
- dependencies:
- monaco-editor: 0.52.2
- state-local: 1.0.7
-
- '@monaco-editor/react@4.6.0(monaco-editor@0.52.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
- dependencies:
- '@monaco-editor/loader': 1.4.0(monaco-editor@0.52.2)
- monaco-editor: 0.52.2
- react: 18.2.0
- react-dom: 18.2.0(react@18.2.0)
-
'@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3':
optional: true
@@ -11959,7 +11926,7 @@ snapshots:
jest-worker@27.5.1:
dependencies:
- '@types/node': 20.14.10
+ '@types/node': 18.19.42
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -12658,8 +12625,6 @@ snapshots:
pkg-types: 1.1.3
ufo: 1.5.4
- monaco-editor@0.52.2: {}
-
ms@2.1.2: {}
ms@2.1.3: {}
@@ -13737,8 +13702,6 @@ snapshots:
standard-as-callback@2.1.0: {}
- state-local@1.0.7: {}
-
statuses@2.0.1: {}
std-env@3.7.0: {}