messiasads commited on
Commit
aaa67c2
·
1 Parent(s): 6077c4c

Remove unused files to clean up

Browse files
components.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": true,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "app/globals.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/utils",
16
- "ui": "@/components/ui",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "iconLibrary": "lucide"
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
components/editor/ask-ai/index.tsx CHANGED
@@ -54,7 +54,7 @@ export function AskAI({
54
  const [hasAsked, setHasAsked] = useState(false);
55
  const [previousPrompt, setPreviousPrompt] = useState("");
56
  const [provider, setProvider] = useLocalStorage("provider", "auto");
57
- const [model, setModel] = useLocalStorage("model", MODELS[0].value);
58
  const [openProvider, setOpenProvider] = useState(false);
59
  const [providerError, setProviderError] = useState("");
60
  const [think, setThink] = useState<string | undefined>(undefined);
@@ -123,6 +123,7 @@ export function AskAI({
123
  } else {
124
  const apiKey = localStorage.getItem("openai_api_key");
125
  const baseUrl = localStorage.getItem("openai_base_url");
 
126
  const request = await fetch("/api/ask-ai", {
127
  method: "POST",
128
  body: JSON.stringify({
@@ -133,6 +134,7 @@ export function AskAI({
133
  redesignMarkdown,
134
  apiKey,
135
  baseUrl,
 
136
  }),
137
  headers: {
138
  "Content-Type": "application/json",
@@ -437,9 +439,6 @@ export function AskAI({
437
  id="diff-patch-checkbox"
438
  checked={isFollowUp}
439
  onCheckedChange={(e) => {
440
- if (e === true && !isSameHtml) {
441
- setModel(MODELS[0].value);
442
- }
443
  setIsFollowUp(e === true);
444
  }}
445
  />
 
54
  const [hasAsked, setHasAsked] = useState(false);
55
  const [previousPrompt, setPreviousPrompt] = useState("");
56
  const [provider, setProvider] = useLocalStorage("provider", "auto");
57
+ const [model, setModel] = useLocalStorage("model", localStorage.getItem("openai_model") || MODELS[0].value);
58
  const [openProvider, setOpenProvider] = useState(false);
59
  const [providerError, setProviderError] = useState("");
60
  const [think, setThink] = useState<string | undefined>(undefined);
 
123
  } else {
124
  const apiKey = localStorage.getItem("openai_api_key");
125
  const baseUrl = localStorage.getItem("openai_base_url");
126
+ const customModel = localStorage.getItem("openai_model");
127
  const request = await fetch("/api/ask-ai", {
128
  method: "POST",
129
  body: JSON.stringify({
 
134
  redesignMarkdown,
135
  apiKey,
136
  baseUrl,
137
+ customModel,
138
  }),
139
  headers: {
140
  "Content-Type": "application/json",
 
439
  id="diff-patch-checkbox"
440
  checked={isFollowUp}
441
  onCheckedChange={(e) => {
 
 
 
442
  setIsFollowUp(e === true);
443
  }}
444
  />
components/editor/ask-ai/settings.tsx CHANGED
@@ -100,7 +100,7 @@ export function Settings({
100
  </label>
101
  <label className="block">
102
  <p className="text-neutral-300 text-sm mb-2.5">
103
- Base URL (optional)
104
  </p>
105
  <Input
106
  type="text"
 
100
  </label>
101
  <label className="block">
102
  <p className="text-neutral-300 text-sm mb-2.5">
103
+ Base URL
104
  </p>
105
  <Input
106
  type="text"
components/login-modal/index.tsx DELETED
@@ -1,48 +0,0 @@
1
- import { Button } from "@/components/ui/button";
2
- import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
3
-
4
- export const LoginModal = ({
5
- open,
6
- onClose,
7
- title = "Login is not available",
8
- description = "This feature is currently disabled as the application no longer relies on Hugging Face authentication.",
9
- }: {
10
- open: boolean;
11
- html?: string;
12
- onClose: React.Dispatch<React.SetStateAction<boolean>>;
13
- title?: string;
14
- description?: string;
15
- }) => {
16
- return (
17
- <Dialog open={open} onOpenChange={onClose}>
18
- <DialogContent className="sm:max-w-lg lg:!p-8 !rounded-3xl !bg-white !border-neutral-100">
19
- <DialogTitle className="hidden" />
20
- <main className="flex flex-col items-start text-left relative pt-2">
21
- <div className="flex items-center justify-start -space-x-4 mb-5">
22
- <div className="size-14 rounded-full bg-pink-200 shadow-2xs flex items-center justify-center text-3xl opacity-50">
23
- 💪
24
- </div>
25
- <div className="size-16 rounded-full bg-amber-200 shadow-2xl flex items-center justify-center text-4xl z-2">
26
- 😎
27
- </div>
28
- <div className="size-14 rounded-full bg-sky-200 shadow-2xs flex items-center justify-center text-3xl opacity-50">
29
- 🙌
30
- </div>
31
- </div>
32
- <p className="text-2xl font-bold text-neutral-950">{title}</p>
33
- <p className="text-neutral-500 text-base mt-2 max-w-sm">
34
- {description}
35
- </p>
36
- <Button
37
- variant="black"
38
- size="lg"
39
- className="w-full !text-base !h-11 mt-8"
40
- onClick={() => onClose(false)}
41
- >
42
- Close
43
- </Button>
44
- </main>
45
- </DialogContent>
46
- </Dialog>
47
- );
48
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
components/pro-modal/index.tsx DELETED
@@ -1,40 +0,0 @@
1
- import { Button } from "@/components/ui/button";
2
- import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
3
-
4
- export const ProModal = ({
5
- open,
6
- onClose,
7
- }: {
8
- open: boolean;
9
- onClose: React.Dispatch<React.SetStateAction<boolean>>;
10
- }) => {
11
- const handleProClick = () => {
12
- // Replace with your own subscription logic
13
- onClose(false);
14
- };
15
- return (
16
- <Dialog open={open} onOpenChange={onClose}>
17
- <DialogContent className="sm:max-w-lg lg:!p-8 !rounded-3xl !bg-white !border-neutral-100">
18
- <DialogTitle className="hidden" />
19
- <main className="flex flex-col items-start text-left relative pt-2">
20
- <h2 className="text-2xl font-bold text-neutral-950">
21
- Upgrade to Pro
22
- </h2>
23
- <p className="text-neutral-500 text-base mt-2 max-w-sm">
24
- You have reached the monthly free limit.
25
- </p>
26
- <Button
27
- variant="black"
28
- size="lg"
29
- className="w-full !text-base !h-11 mt-8"
30
- onClick={handleProClick}
31
- >
32
- Upgrade
33
- </Button>
34
- </main>
35
- </DialogContent>
36
- </Dialog>
37
- );
38
- };
39
-
40
- export default ProModal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/Project.ts DELETED
@@ -1,27 +0,0 @@
1
- import mongoose from "mongoose";
2
-
3
- const ProjectSchema = new mongoose.Schema({
4
- space_id: {
5
- type: String,
6
- required: true,
7
- },
8
- user_id: {
9
- type: String,
10
- required: true,
11
- },
12
- prompts: {
13
- type: [String],
14
- default: [],
15
- },
16
- _createdAt: {
17
- type: Date,
18
- default: Date.now,
19
- },
20
- _updatedAt: {
21
- type: Date,
22
- default: Date.now,
23
- },
24
- });
25
-
26
- export default mongoose.models.Project ||
27
- mongoose.model("Project", ProjectSchema);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
next.config.ts CHANGED
@@ -1,5 +1,9 @@
1
  import type { NextConfig } from "next";
2
 
 
 
 
 
3
  const nextConfig: NextConfig = {
4
  /* config options here */
5
  webpack(config, options) {
@@ -26,4 +30,4 @@ const nextConfig: NextConfig = {
26
  },
27
  };
28
 
29
- export default nextConfig;
 
1
  import type { NextConfig } from "next";
2
 
3
+ const withBundleAnalyzer = require('@next/bundle-analyzer')({
4
+ enabled: process.env.ANALYZE === 'true',
5
+ })
6
+
7
  const nextConfig: NextConfig = {
8
  /* config options here */
9
  webpack(config, options) {
 
30
  },
31
  };
32
 
33
+ export default withBundleAnalyzer(nextConfig);
package-lock.json CHANGED
The diff for this file is too large to render. See raw diff
 
package.json CHANGED
@@ -6,7 +6,8 @@
6
  "dev": "next dev --turbopack",
7
  "build": "next build",
8
  "start": "next start",
9
- "lint": "next lint"
 
10
  },
11
  "dependencies": {
12
  "@monaco-editor/react": "^4.7.0-rc.0",
@@ -23,14 +24,18 @@
23
  "@radix-ui/react-toggle": "^1.1.9",
24
  "@radix-ui/react-toggle-group": "^1.1.10",
25
  "@radix-ui/react-tooltip": "^1.2.7",
26
- "@tanstack/eslint-plugin-query": "^5.78.0",
 
27
  "@tanstack/react-query": "^5.80.6",
28
- "@tanstack/react-query-devtools": "^5.80.6",
 
29
  "axios": "^1.9.0",
30
  "class-variance-authority": "^0.7.1",
31
  "classnames": "^2.5.1",
32
  "clsx": "^2.1.1",
33
  "date-fns": "^4.1.0",
 
 
34
  "lucide-react": "^0.513.0",
35
  "monaco-editor": "^0.52.2",
36
  "mongoose": "^8.15.1",
@@ -44,20 +49,19 @@
44
  "redaxios": "^0.5.1",
45
  "sonner": "^2.0.5",
46
  "tailwind-merge": "^3.3.0",
 
 
 
47
  "zod": "^3.25.57"
48
  },
49
  "devDependencies": {
50
  "@eslint/eslintrc": "^3",
51
- "@tailwindcss/postcss": "^4",
52
- "@types/node": "^20",
53
  "@types/react": "^19",
54
  "@types/react-dom": "^19",
55
- "eslint": "^9",
56
- "eslint-config-next": "15.3.3",
57
  "file-loader": "^6.2.0",
58
- "tailwindcss": "^4",
59
- "tw-animate-css": "^1.3.4",
60
- "typescript": "^5",
61
- "url-loader": "^4.1.1"
62
  }
63
  }
 
6
  "dev": "next dev --turbopack",
7
  "build": "next build",
8
  "start": "next start",
9
+ "lint": "next lint",
10
+ "analyze": "ANALYZE=true next build"
11
  },
12
  "dependencies": {
13
  "@monaco-editor/react": "^4.7.0-rc.0",
 
24
  "@radix-ui/react-toggle": "^1.1.9",
25
  "@radix-ui/react-toggle-group": "^1.1.10",
26
  "@radix-ui/react-tooltip": "^1.2.7",
27
+ "@tailwindcss/postcss": "^4.1.11",
28
+ "@tanstack/eslint-plugin-query": "^5.81.2",
29
  "@tanstack/react-query": "^5.80.6",
30
+ "@tanstack/react-query-devtools": "^5.83.0",
31
+ "@types/node": "^24.1.0",
32
  "axios": "^1.9.0",
33
  "class-variance-authority": "^0.7.1",
34
  "classnames": "^2.5.1",
35
  "clsx": "^2.1.1",
36
  "date-fns": "^4.1.0",
37
+ "eslint": "^9.31.0",
38
+ "eslint-config-next": "^15.4.3",
39
  "lucide-react": "^0.513.0",
40
  "monaco-editor": "^0.52.2",
41
  "mongoose": "^8.15.1",
 
49
  "redaxios": "^0.5.1",
50
  "sonner": "^2.0.5",
51
  "tailwind-merge": "^3.3.0",
52
+ "tailwindcss": "^4.1.11",
53
+ "tw-animate-css": "^1.3.5",
54
+ "typescript": "^5.8.3",
55
  "zod": "^3.25.57"
56
  },
57
  "devDependencies": {
58
  "@eslint/eslintrc": "^3",
59
+ "@next/bundle-analyzer": "^15.4.3",
 
60
  "@types/react": "^19",
61
  "@types/react-dom": "^19",
 
 
62
  "file-loader": "^6.2.0",
63
+ "ts-prune": "^0.10.3",
64
+ "url-loader": "^4.1.1",
65
+ "webpack-bundle-analyzer": "^4.10.2"
 
66
  }
67
  }
public/arrow.svg DELETED
public/background_noisy.webp DELETED
Binary file (35 kB)
 
public/banner.png DELETED
Binary file (96.9 kB)
 
public/logo.svg DELETED
public/providers/fireworks-ai.svg DELETED
public/providers/hyperbolic.svg DELETED
public/providers/nebius.svg DELETED
public/providers/novita.svg DELETED
public/providers/sambanova.svg DELETED
public/providers/together.svg DELETED
public/success.mp3 DELETED
Binary file (49.3 kB)