Cole Medin commited on
Commit
2120aea
·
unverified ·
2 Parent(s): eb76765 dcad4d3

Merge pull request #491 from dustinwloring1988/stable-additions

Browse files
README.md CHANGED
@@ -4,11 +4,11 @@
4
 
5
  This fork of Bolt.new (oTToDev) allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK! See the instructions below for running this locally and extending it to include more models.
6
 
7
- Join the community for oTToDev!
8
 
9
  https://thinktank.ottomator.ai
10
 
11
- # Requested Additions to this Fork - Feel Free to Contribute!!
12
 
13
  - ✅ OpenRouter Integration (@coleam00)
14
  - ✅ Gemini Integration (@jonathands)
@@ -49,7 +49,7 @@ https://thinktank.ottomator.ai
49
  - ⬜ Upload documents for knowledge - UI design templates, a code base to reference coding style, etc.
50
  - ⬜ Voice prompting
51
 
52
- # Bolt.new: AI-Powered Full-Stack Web Development in the Browser
53
 
54
  Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI-powered web dev agent using the Bolt open source codebase, [click here to get started!](./CONTRIBUTING.md)
55
 
@@ -124,6 +124,13 @@ Optionally, you can set the debug level:
124
  VITE_LOG_LEVEL=debug
125
  ```
126
 
 
 
 
 
 
 
 
127
  **Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
128
 
129
  ## Run with Docker
@@ -192,31 +199,6 @@ sudo npm install -g pnpm
192
  pnpm run dev
193
  ```
194
 
195
- ## Super Important Note on Running Ollama Models
196
-
197
- Ollama models by default only have 2048 tokens for their context window. Even for large models that can easily handle way more.
198
- This is not a large enough window to handle the Bolt.new/oTToDev prompt! You have to create a version of any model you want
199
- to use where you specify a larger context window. Luckily it's super easy to do that.
200
-
201
- All you have to do is:
202
-
203
- - Create a file called "Modelfile" (no file extension) anywhere on your computer
204
- - Put in the two lines:
205
-
206
- ```
207
- FROM [Ollama model ID such as qwen2.5-coder:7b]
208
- PARAMETER num_ctx 32768
209
- ```
210
-
211
- - Run the command:
212
-
213
- ```
214
- ollama create -f Modelfile [your new model ID, can be whatever you want (example: qwen2.5-coder-extra-ctx:7b)]
215
- ```
216
-
217
- Now you have a new Ollama model that isn't heavily limited in the context length like Ollama models are by default for some reason.
218
- You'll see this new model in the list of Ollama models along with all the others you pulled!
219
-
220
  ## Adding New LLMs:
221
 
222
  To make new LLMs available to use in this version of Bolt.new, head on over to `app/utils/constants.ts` and find the constant MODEL_LIST. Each element in this array is an object that has the model ID for the name (get this from the provider's API documentation), a label for the frontend model dropdown, and the provider.
 
4
 
5
  This fork of Bolt.new (oTToDev) allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK! See the instructions below for running this locally and extending it to include more models.
6
 
7
+ ## Join the community for oTToDev!
8
 
9
  https://thinktank.ottomator.ai
10
 
11
+ ## Requested Additions to this Fork - Feel Free to Contribute!!
12
 
13
  - ✅ OpenRouter Integration (@coleam00)
14
  - ✅ Gemini Integration (@jonathands)
 
49
  - ⬜ Upload documents for knowledge - UI design templates, a code base to reference coding style, etc.
50
  - ⬜ Voice prompting
51
 
52
+ ## Bolt.new: AI-Powered Full-Stack Web Development in the Browser
53
 
54
  Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI-powered web dev agent using the Bolt open source codebase, [click here to get started!](./CONTRIBUTING.md)
55
 
 
124
  VITE_LOG_LEVEL=debug
125
  ```
126
 
127
+ And if using Ollama set the DEFAULT_NUM_CTX, the example below uses 8K context and ollama running on localhost port 11434:
128
+
129
+ ```
130
+ OLLAMA_API_BASE_URL=http://localhost:11434
131
+ DEFAULT_NUM_CTX=8192
132
+ ```
133
+
134
  **Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
135
 
136
  ## Run with Docker
 
199
  pnpm run dev
200
  ```
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  ## Adding New LLMs:
203
 
204
  To make new LLMs available to use in this version of Bolt.new, head on over to `app/utils/constants.ts` and find the constant MODEL_LIST. Each element in this array is an object that has the model ID for the name (get this from the provider's API documentation), a label for the frontend model dropdown, and the provider.
app/components/chat/BaseChat.tsx CHANGED
@@ -47,7 +47,7 @@ const ModelSelector = ({ model, setModel, provider, setProvider, modelList, prov
47
  key={provider?.name}
48
  value={model}
49
  onChange={(e) => setModel(e.target.value)}
50
- className="flex-1 p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none focus:ring-2 focus:ring-bolt-elements-focus transition-all lg:max-w-[70%] "
51
  >
52
  {[...modelList]
53
  .filter((e) => e.provider == provider?.name && e.name)
@@ -116,6 +116,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
116
  const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
117
  const [apiKeys, setApiKeys] = useState<Record<string, string>>({});
118
  const [modelList, setModelList] = useState(MODEL_LIST);
 
119
 
120
  useEffect(() => {
121
  // Load API keys from cookies on component mount
@@ -199,30 +200,48 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
199
  </ClientOnly>
200
  <div
201
  className={classNames(
202
- ' bg-bolt-elements-background-depth-2 p-3 rounded-lg border border-bolt-elements-borderColor relative w-full max-w-chat mx-auto z-prompt mb-6',
203
  {
204
  'sticky bottom-2': chatStarted,
205
  },
206
  )}
207
  >
208
- <ModelSelector
209
- key={provider?.name + ':' + modelList.length}
210
- model={model}
211
- setModel={setModel}
212
- modelList={modelList}
213
- provider={provider}
214
- setProvider={setProvider}
215
- providerList={PROVIDER_LIST}
216
- apiKeys={apiKeys}
217
- />
 
 
 
 
 
218
 
219
- {provider && (
220
- <APIKeyManager
221
- provider={provider}
222
- apiKey={apiKeys[provider.name] || ''}
223
- setApiKey={(key) => updateApiKey(provider.name, key)}
224
- />
225
- )}
 
 
 
 
 
 
 
 
 
 
 
 
 
226
 
227
  <div
228
  className={classNames(
 
47
  key={provider?.name}
48
  value={model}
49
  onChange={(e) => setModel(e.target.value)}
50
+ className="flex-1 p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none focus:ring-2 focus:ring-bolt-elements-focus transition-all lg:max-w-[70%]"
51
  >
52
  {[...modelList]
53
  .filter((e) => e.provider == provider?.name && e.name)
 
116
  const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
117
  const [apiKeys, setApiKeys] = useState<Record<string, string>>({});
118
  const [modelList, setModelList] = useState(MODEL_LIST);
119
+ const [isModelSettingsCollapsed, setIsModelSettingsCollapsed] = useState(false);
120
 
121
  useEffect(() => {
122
  // Load API keys from cookies on component mount
 
200
  </ClientOnly>
201
  <div
202
  className={classNames(
203
+ 'bg-bolt-elements-background-depth-2 p-3 rounded-lg border border-bolt-elements-borderColor relative w-full max-w-chat mx-auto z-prompt mb-6',
204
  {
205
  'sticky bottom-2': chatStarted,
206
  },
207
  )}
208
  >
209
+ <div>
210
+ <div className="flex justify-between items-center mb-2">
211
+ <button
212
+ onClick={() => setIsModelSettingsCollapsed(!isModelSettingsCollapsed)}
213
+ className={classNames('flex items-center gap-2 p-2 rounded-lg transition-all', {
214
+ 'bg-bolt-elements-item-backgroundAccent text-bolt-elements-item-contentAccent':
215
+ isModelSettingsCollapsed,
216
+ 'bg-bolt-elements-item-backgroundDefault text-bolt-elements-item-contentDefault':
217
+ !isModelSettingsCollapsed,
218
+ })}
219
+ >
220
+ <div className={`i-ph:caret-${isModelSettingsCollapsed ? 'right' : 'down'} text-lg`} />
221
+ <span>Model Settings</span>
222
+ </button>
223
+ </div>
224
 
225
+ <div className={isModelSettingsCollapsed ? 'hidden' : ''}>
226
+ <ModelSelector
227
+ key={provider?.name + ':' + modelList.length}
228
+ model={model}
229
+ setModel={setModel}
230
+ modelList={modelList}
231
+ provider={provider}
232
+ setProvider={setProvider}
233
+ providerList={PROVIDER_LIST}
234
+ apiKeys={apiKeys}
235
+ />
236
+ {provider && (
237
+ <APIKeyManager
238
+ provider={provider}
239
+ apiKey={apiKeys[provider.name] || ''}
240
+ setApiKey={(key) => updateApiKey(provider.name, key)}
241
+ />
242
+ )}
243
+ </div>
244
+ </div>
245
 
246
  <div
247
  className={classNames(
app/components/chat/ExamplePrompts.tsx CHANGED
@@ -5,7 +5,7 @@ const EXAMPLE_PROMPTS = [
5
  { text: 'Build a simple blog using Astro' },
6
  { text: 'Create a cookie consent form using Material UI' },
7
  { text: 'Make a space invaders game' },
8
- { text: 'How do I center a div?' },
9
  ];
10
 
11
  export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInput?: string): void | undefined }) {
 
5
  { text: 'Build a simple blog using Astro' },
6
  { text: 'Create a cookie consent form using Material UI' },
7
  { text: 'Make a space invaders game' },
8
+ { text: 'Make a Tic Tac Toe game in html, css and js only' },
9
  ];
10
 
11
  export function ExamplePrompts(sendMessage?: { (event: React.UIEvent, messageInput?: string): void | undefined }) {
app/components/chat/ImportFolderButton.tsx CHANGED
@@ -156,7 +156,7 @@ ${fileArtifacts.join('\n\n')}
156
  }}
157
  className={className}
158
  >
159
- <div className="i-ph:folder-simple-upload" />
160
  Import Folder
161
  </button>
162
  </>
 
156
  }}
157
  className={className}
158
  >
159
+ <div className="i-ph:upload-simple" />
160
  Import Folder
161
  </button>
162
  </>
app/components/chat/Markdown.spec.ts ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { describe, expect, it } from 'vitest';
2
+ import { stripCodeFenceFromArtifact } from './Markdown';
3
+
4
+ describe('stripCodeFenceFromArtifact', () => {
5
+ it('should remove code fences around artifact element', () => {
6
+ const input = "```xml\n<div class='__boltArtifact__'></div>\n```";
7
+ const expected = "\n<div class='__boltArtifact__'></div>\n";
8
+ expect(stripCodeFenceFromArtifact(input)).toBe(expected);
9
+ });
10
+
11
+ it('should handle code fence with language specification', () => {
12
+ const input = "```typescript\n<div class='__boltArtifact__'></div>\n```";
13
+ const expected = "\n<div class='__boltArtifact__'></div>\n";
14
+ expect(stripCodeFenceFromArtifact(input)).toBe(expected);
15
+ });
16
+
17
+ it('should not modify content without artifacts', () => {
18
+ const input = '```\nregular code block\n```';
19
+ expect(stripCodeFenceFromArtifact(input)).toBe(input);
20
+ });
21
+
22
+ it('should handle empty input', () => {
23
+ expect(stripCodeFenceFromArtifact('')).toBe('');
24
+ });
25
+
26
+ it('should handle artifact without code fences', () => {
27
+ const input = "<div class='__boltArtifact__'></div>";
28
+ expect(stripCodeFenceFromArtifact(input)).toBe(input);
29
+ });
30
+
31
+ it('should handle multiple artifacts but only remove fences around them', () => {
32
+ const input = [
33
+ 'Some text',
34
+ '```typescript',
35
+ "<div class='__boltArtifact__'></div>",
36
+ '```',
37
+ '```',
38
+ 'regular code',
39
+ '```',
40
+ ].join('\n');
41
+
42
+ const expected = ['Some text', '', "<div class='__boltArtifact__'></div>", '', '```', 'regular code', '```'].join(
43
+ '\n',
44
+ );
45
+
46
+ expect(stripCodeFenceFromArtifact(input)).toBe(expected);
47
+ });
48
+ });
app/components/chat/Markdown.tsx CHANGED
@@ -68,7 +68,51 @@ export const Markdown = memo(({ children, html = false, limitedMarkdown = false
68
  remarkPlugins={remarkPlugins(limitedMarkdown)}
69
  rehypePlugins={rehypePlugins(html)}
70
  >
71
- {children}
72
  </ReactMarkdown>
73
  );
74
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  remarkPlugins={remarkPlugins(limitedMarkdown)}
69
  rehypePlugins={rehypePlugins(html)}
70
  >
71
+ {stripCodeFenceFromArtifact(children)}
72
  </ReactMarkdown>
73
  );
74
  });
75
+
76
+ /**
77
+ * Removes code fence markers (```) surrounding an artifact element while preserving the artifact content.
78
+ * This is necessary because artifacts should not be wrapped in code blocks when rendered for rendering action list.
79
+ *
80
+ * @param content - The markdown content to process
81
+ * @returns The processed content with code fence markers removed around artifacts
82
+ *
83
+ * @example
84
+ * // Removes code fences around artifact
85
+ * const input = "```xml\n<div class='__boltArtifact__'></div>\n```";
86
+ * stripCodeFenceFromArtifact(input);
87
+ * // Returns: "\n<div class='__boltArtifact__'></div>\n"
88
+ *
89
+ * @remarks
90
+ * - Only removes code fences that directly wrap an artifact (marked with __boltArtifact__ class)
91
+ * - Handles code fences with optional language specifications (e.g. ```xml, ```typescript)
92
+ * - Preserves original content if no artifact is found
93
+ * - Safely handles edge cases like empty input or artifacts at start/end of content
94
+ */
95
+ export const stripCodeFenceFromArtifact = (content: string) => {
96
+ if (!content || !content.includes('__boltArtifact__')) {
97
+ return content;
98
+ }
99
+
100
+ const lines = content.split('\n');
101
+ const artifactLineIndex = lines.findIndex((line) => line.includes('__boltArtifact__'));
102
+
103
+ // Return original content if artifact line not found
104
+ if (artifactLineIndex === -1) {
105
+ return content;
106
+ }
107
+
108
+ // Check previous line for code fence
109
+ if (artifactLineIndex > 0 && lines[artifactLineIndex - 1]?.trim().match(/^```\w*$/)) {
110
+ lines[artifactLineIndex - 1] = '';
111
+ }
112
+
113
+ if (artifactLineIndex < lines.length - 1 && lines[artifactLineIndex + 1]?.trim().match(/^```$/)) {
114
+ lines[artifactLineIndex + 1] = '';
115
+ }
116
+
117
+ return lines.join('\n');
118
+ };
app/lib/persistence/db.ts CHANGED
@@ -6,6 +6,11 @@ const logger = createScopedLogger('ChatHistory');
6
 
7
  // this is used at the top level and never rejects
8
  export async function openDatabase(): Promise<IDBDatabase | undefined> {
 
 
 
 
 
9
  return new Promise((resolve) => {
10
  const request = indexedDB.open('boltHistory', 1);
11
 
 
6
 
7
  // this is used at the top level and never rejects
8
  export async function openDatabase(): Promise<IDBDatabase | undefined> {
9
+ if (typeof indexedDB === 'undefined') {
10
+ console.error('indexedDB is not available in this environment.');
11
+ return undefined;
12
+ }
13
+
14
  return new Promise((resolve) => {
15
  const request = indexedDB.open('boltHistory', 1);
16
 
app/lib/runtime/action-runner.ts CHANGED
@@ -84,11 +84,11 @@ export class ActionRunner {
84
  }
85
 
86
  if (action.executed) {
87
- return;
88
  }
89
 
90
  if (isStreaming && action.type !== 'file') {
91
- return;
92
  }
93
 
94
  this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming });
@@ -100,7 +100,6 @@ export class ActionRunner {
100
  .catch((error) => {
101
  console.error('Action failed:', error);
102
  });
103
- return this.#currentExecutionPromise;
104
  }
105
 
106
  async #executeAction(actionId: string, isStreaming: boolean = false) {
 
84
  }
85
 
86
  if (action.executed) {
87
+ return; // No return value here
88
  }
89
 
90
  if (isStreaming && action.type !== 'file') {
91
+ return; // No return value here
92
  }
93
 
94
  this.#updateAction(actionId, { ...action, ...data.action, executed: !isStreaming });
 
100
  .catch((error) => {
101
  console.error('Action failed:', error);
102
  });
 
103
  }
104
 
105
  async #executeAction(actionId: string, isStreaming: boolean = false) {
app/lib/stores/workbench.ts CHANGED
@@ -14,6 +14,7 @@ import { saveAs } from 'file-saver';
14
  import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
15
  import * as nodePath from 'node:path';
16
  import { extractRelativePath } from '~/utils/diff';
 
17
 
18
  export interface ArtifactState {
19
  id: string;
@@ -328,6 +329,13 @@ export class WorkbenchStore {
328
  const zip = new JSZip();
329
  const files = this.files.get();
330
 
 
 
 
 
 
 
 
331
  for (const [filePath, dirent] of Object.entries(files)) {
332
  if (dirent?.type === 'file' && !dirent.isBinary) {
333
  const relativePath = extractRelativePath(filePath);
@@ -350,8 +358,9 @@ export class WorkbenchStore {
350
  }
351
  }
352
 
 
353
  const content = await zip.generateAsync({ type: 'blob' });
354
- saveAs(content, 'project.zip');
355
  }
356
 
357
  async syncFiles(targetHandle: FileSystemDirectoryHandle) {
 
14
  import { Octokit, type RestEndpointMethodTypes } from '@octokit/rest';
15
  import * as nodePath from 'node:path';
16
  import { extractRelativePath } from '~/utils/diff';
17
+ import { description } from '~/lib/persistence';
18
 
19
  export interface ArtifactState {
20
  id: string;
 
329
  const zip = new JSZip();
330
  const files = this.files.get();
331
 
332
+ // Get the project name from the description input, or use a default name
333
+ const projectName = (description.value ?? 'project').toLocaleLowerCase().split(' ').join('_');
334
+
335
+ // Generate a simple 6-character hash based on the current timestamp
336
+ const timestampHash = Date.now().toString(36).slice(-6);
337
+ const uniqueProjectName = `${projectName}_${timestampHash}`;
338
+
339
  for (const [filePath, dirent] of Object.entries(files)) {
340
  if (dirent?.type === 'file' && !dirent.isBinary) {
341
  const relativePath = extractRelativePath(filePath);
 
358
  }
359
  }
360
 
361
+ // Generate the zip file and save it
362
  const content = await zip.generateAsync({ type: 'blob' });
363
+ saveAs(content, `${uniqueProjectName}.zip`);
364
  }
365
 
366
  async syncFiles(targetHandle: FileSystemDirectoryHandle) {
app/utils/constants.ts CHANGED
@@ -283,9 +283,11 @@ const getOllamaBaseUrl = () => {
283
  };
284
 
285
  async function getOllamaModels(): Promise<ModelInfo[]> {
286
- //if (typeof window === 'undefined') {
287
- //return [];
288
- //}
 
 
289
 
290
  try {
291
  const baseUrl = getOllamaBaseUrl();
 
283
  };
284
 
285
  async function getOllamaModels(): Promise<ModelInfo[]> {
286
+ /*
287
+ * if (typeof window === 'undefined') {
288
+ * return [];
289
+ * }
290
+ */
291
 
292
  try {
293
  const baseUrl = getOllamaBaseUrl();
app/utils/logger.ts CHANGED
@@ -11,7 +11,7 @@ interface Logger {
11
  setLevel: (level: DebugLevel) => void;
12
  }
13
 
14
- let currentLevel: DebugLevel = import.meta.env.VITE_LOG_LEVEL ?? import.meta.env.DEV ? 'debug' : 'info';
15
 
16
  const isWorker = 'HTMLRewriter' in globalThis;
17
  const supportsColor = !isWorker;
 
11
  setLevel: (level: DebugLevel) => void;
12
  }
13
 
14
+ let currentLevel: DebugLevel = (import.meta.env.VITE_LOG_LEVEL ?? import.meta.env.DEV) ? 'debug' : 'info';
15
 
16
  const isWorker = 'HTMLRewriter' in globalThis;
17
  const supportsColor = !isWorker;
docker-compose.yaml CHANGED
@@ -1,5 +1,5 @@
1
  services:
2
- bolt-ai:
3
  image: bolt-ai:production
4
  build:
5
  context: .
@@ -24,12 +24,12 @@ services:
24
  - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
25
  - RUNNING_IN_DOCKER=true
26
  extra_hosts:
27
- - "host.docker.internal:host-gateway"
28
  command: pnpm run dockerstart
29
  profiles:
30
- - production # This service only runs in the production profile
31
 
32
- bolt-ai-dev:
33
  image: bolt-ai:development
34
  build:
35
  target: bolt-ai-development
@@ -39,7 +39,7 @@ services:
39
  - VITE_HMR_HOST=localhost
40
  - VITE_HMR_PORT=5173
41
  - CHOKIDAR_USEPOLLING=true
42
- - WATCHPACK_POLLING=true
43
  - PORT=5173
44
  - GROQ_API_KEY=${GROQ_API_KEY}
45
  - HuggingFace_API_KEY=${HuggingFace_API_KEY}
@@ -52,7 +52,7 @@ services:
52
  - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
53
  - RUNNING_IN_DOCKER=true
54
  extra_hosts:
55
- - "host.docker.internal:host-gateway"
56
  volumes:
57
  - type: bind
58
  source: .
@@ -60,6 +60,6 @@ services:
60
  consistency: cached
61
  - /app/node_modules
62
  ports:
63
- - "5173:5173" # Same port, no conflict as only one runs at a time
64
  command: pnpm run dev --host 0.0.0.0
65
- profiles: ["development", "default"] # Make development the default profile
 
1
  services:
2
+ app-prod:
3
  image: bolt-ai:production
4
  build:
5
  context: .
 
24
  - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
25
  - RUNNING_IN_DOCKER=true
26
  extra_hosts:
27
+ - "host.docker.internal:host-gateway"
28
  command: pnpm run dockerstart
29
  profiles:
30
+ - production
31
 
32
+ app-dev:
33
  image: bolt-ai:development
34
  build:
35
  target: bolt-ai-development
 
39
  - VITE_HMR_HOST=localhost
40
  - VITE_HMR_PORT=5173
41
  - CHOKIDAR_USEPOLLING=true
42
+ - WATCHPACK_POLLING=true
43
  - PORT=5173
44
  - GROQ_API_KEY=${GROQ_API_KEY}
45
  - HuggingFace_API_KEY=${HuggingFace_API_KEY}
 
52
  - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
53
  - RUNNING_IN_DOCKER=true
54
  extra_hosts:
55
+ - "host.docker.internal:host-gateway"
56
  volumes:
57
  - type: bind
58
  source: .
 
60
  consistency: cached
61
  - /app/node_modules
62
  ports:
63
+ - "5173:5173"
64
  command: pnpm run dev --host 0.0.0.0
65
+ profiles: ["development", "default"]
package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
package.json CHANGED
@@ -28,95 +28,98 @@
28
  },
29
  "dependencies": {
30
  "@ai-sdk/anthropic": "^0.0.39",
31
- "@ai-sdk/cohere": "^1.0.1",
32
  "@ai-sdk/google": "^0.0.52",
33
  "@ai-sdk/mistral": "^0.0.43",
34
  "@ai-sdk/openai": "^0.0.66",
35
- "@codemirror/autocomplete": "^6.17.0",
36
- "@codemirror/commands": "^6.6.0",
37
  "@codemirror/lang-cpp": "^6.0.2",
38
- "@codemirror/lang-css": "^6.2.1",
39
  "@codemirror/lang-html": "^6.4.9",
40
  "@codemirror/lang-javascript": "^6.2.2",
41
  "@codemirror/lang-json": "^6.0.1",
42
- "@codemirror/lang-markdown": "^6.2.5",
43
  "@codemirror/lang-python": "^6.1.6",
44
  "@codemirror/lang-sass": "^6.0.2",
45
  "@codemirror/lang-wast": "^6.0.2",
46
- "@codemirror/language": "^6.10.2",
47
- "@codemirror/search": "^6.5.6",
48
  "@codemirror/state": "^6.4.1",
49
- "@codemirror/view": "^6.28.4",
50
- "@iconify-json/ph": "^1.1.13",
51
- "@iconify-json/svg-spinners": "^1.1.2",
52
- "@lezer/highlight": "^1.2.0",
53
- "@nanostores/react": "^0.7.2",
54
  "@octokit/rest": "^21.0.2",
55
- "@octokit/types": "^13.6.1",
56
  "@openrouter/ai-sdk-provider": "^0.0.5",
57
- "@radix-ui/react-dialog": "^1.1.1",
58
- "@radix-ui/react-dropdown-menu": "^2.1.1",
59
  "@radix-ui/react-tooltip": "^1.1.4",
60
- "@remix-run/cloudflare": "^2.10.2",
61
- "@remix-run/cloudflare-pages": "^2.10.2",
62
- "@remix-run/react": "^2.10.2",
63
- "@uiw/codemirror-theme-vscode": "^4.23.0",
64
- "@unocss/reset": "^0.61.0",
65
  "@webcontainer/api": "1.3.0-internal.10",
66
  "@xterm/addon-fit": "^0.10.0",
67
  "@xterm/addon-web-links": "^0.11.0",
68
  "@xterm/xterm": "^5.5.0",
69
- "ai": "^3.4.9",
70
  "date-fns": "^3.6.0",
71
  "diff": "^5.2.0",
72
  "file-saver": "^2.0.5",
73
- "framer-motion": "^11.2.12",
74
  "ignore": "^6.0.2",
75
- "isbot": "^4.1.0",
76
  "istextorbinary": "^9.5.0",
77
- "jose": "^5.6.3",
78
  "js-cookie": "^3.0.5",
79
  "jszip": "^3.10.1",
80
  "nanostores": "^0.10.3",
81
  "ollama-ai-provider": "^0.15.2",
82
- "react": "^18.2.0",
83
- "react-dom": "^18.2.0",
84
- "react-hotkeys-hook": "^4.5.0",
 
85
  "react-markdown": "^9.0.1",
86
- "react-resizable-panels": "^2.0.20",
87
- "react-toastify": "^10.0.5",
88
  "rehype-raw": "^7.0.0",
89
  "rehype-sanitize": "^6.0.0",
90
  "remark-gfm": "^4.0.0",
91
  "remix-island": "^0.2.0",
92
- "remix-utils": "^7.6.0",
93
- "shiki": "^1.9.1",
94
  "unist-util-visit": "^5.0.0"
95
  },
96
  "devDependencies": {
97
  "@blitz/eslint-plugin": "0.1.0",
98
- "@cloudflare/workers-types": "^4.20240620.0",
99
- "@remix-run/dev": "^2.10.0",
100
- "@types/diff": "^5.2.1",
 
 
101
  "@types/file-saver": "^2.0.7",
102
  "@types/js-cookie": "^3.0.6",
103
- "@types/react": "^18.2.20",
104
- "@types/react-dom": "^18.2.7",
105
  "fast-glob": "^3.3.2",
106
  "husky": "9.1.7",
107
  "is-ci": "^3.0.1",
108
  "node-fetch": "^3.3.2",
109
- "prettier": "^3.3.2",
110
- "sass-embedded": "^1.80.3",
111
- "typescript": "^5.5.2",
112
  "unified": "^11.0.5",
113
- "unocss": "^0.61.3",
114
- "vite": "^5.3.6",
115
  "vite-plugin-node-polyfills": "^0.22.0",
116
  "vite-plugin-optimize-css-modules": "^1.1.0",
117
  "vite-tsconfig-paths": "^4.3.2",
118
- "vitest": "^2.0.1",
119
- "wrangler": "^3.63.2",
120
  "zod": "^3.23.8"
121
  },
122
  "resolutions": {
 
28
  },
29
  "dependencies": {
30
  "@ai-sdk/anthropic": "^0.0.39",
31
+ "@ai-sdk/cohere": "^1.0.3",
32
  "@ai-sdk/google": "^0.0.52",
33
  "@ai-sdk/mistral": "^0.0.43",
34
  "@ai-sdk/openai": "^0.0.66",
35
+ "@codemirror/autocomplete": "^6.18.3",
36
+ "@codemirror/commands": "^6.7.1",
37
  "@codemirror/lang-cpp": "^6.0.2",
38
+ "@codemirror/lang-css": "^6.3.1",
39
  "@codemirror/lang-html": "^6.4.9",
40
  "@codemirror/lang-javascript": "^6.2.2",
41
  "@codemirror/lang-json": "^6.0.1",
42
+ "@codemirror/lang-markdown": "^6.3.1",
43
  "@codemirror/lang-python": "^6.1.6",
44
  "@codemirror/lang-sass": "^6.0.2",
45
  "@codemirror/lang-wast": "^6.0.2",
46
+ "@codemirror/language": "^6.10.6",
47
+ "@codemirror/search": "^6.5.8",
48
  "@codemirror/state": "^6.4.1",
49
+ "@codemirror/view": "^6.35.0",
50
+ "@iconify-json/ph": "^1.2.1",
51
+ "@iconify-json/svg-spinners": "^1.2.1",
52
+ "@lezer/highlight": "^1.2.1",
53
+ "@nanostores/react": "^0.7.3",
54
  "@octokit/rest": "^21.0.2",
55
+ "@octokit/types": "^13.6.2",
56
  "@openrouter/ai-sdk-provider": "^0.0.5",
57
+ "@radix-ui/react-dialog": "^1.1.2",
58
+ "@radix-ui/react-dropdown-menu": "^2.1.2",
59
  "@radix-ui/react-tooltip": "^1.1.4",
60
+ "@remix-run/cloudflare": "^2.15.0",
61
+ "@remix-run/cloudflare-pages": "^2.15.0",
62
+ "@remix-run/react": "^2.15.0",
63
+ "@uiw/codemirror-theme-vscode": "^4.23.6",
64
+ "@unocss/reset": "^0.61.9",
65
  "@webcontainer/api": "1.3.0-internal.10",
66
  "@xterm/addon-fit": "^0.10.0",
67
  "@xterm/addon-web-links": "^0.11.0",
68
  "@xterm/xterm": "^5.5.0",
69
+ "ai": "^3.4.33",
70
  "date-fns": "^3.6.0",
71
  "diff": "^5.2.0",
72
  "file-saver": "^2.0.5",
73
+ "framer-motion": "^11.12.0",
74
  "ignore": "^6.0.2",
75
+ "isbot": "^4.4.0",
76
  "istextorbinary": "^9.5.0",
77
+ "jose": "^5.9.6",
78
  "js-cookie": "^3.0.5",
79
  "jszip": "^3.10.1",
80
  "nanostores": "^0.10.3",
81
  "ollama-ai-provider": "^0.15.2",
82
+ "pnpm": "^9.14.4",
83
+ "react": "^18.3.1",
84
+ "react-dom": "^18.3.1",
85
+ "react-hotkeys-hook": "^4.6.1",
86
  "react-markdown": "^9.0.1",
87
+ "react-resizable-panels": "^2.1.7",
88
+ "react-toastify": "^10.0.6",
89
  "rehype-raw": "^7.0.0",
90
  "rehype-sanitize": "^6.0.0",
91
  "remark-gfm": "^4.0.0",
92
  "remix-island": "^0.2.0",
93
+ "remix-utils": "^7.7.0",
94
+ "shiki": "^1.24.0",
95
  "unist-util-visit": "^5.0.0"
96
  },
97
  "devDependencies": {
98
  "@blitz/eslint-plugin": "0.1.0",
99
+ "@cloudflare/workers-types": "^4.20241127.0",
100
+ "@jridgewell/sourcemap-codec": "^1.5.0",
101
+ "@remix-run/dev": "^2.15.0",
102
+ "@rollup/plugin-inject": "^5.0.5",
103
+ "@types/diff": "^5.2.3",
104
  "@types/file-saver": "^2.0.7",
105
  "@types/js-cookie": "^3.0.6",
106
+ "@types/react": "^18.3.12",
107
+ "@types/react-dom": "^18.3.1",
108
  "fast-glob": "^3.3.2",
109
  "husky": "9.1.7",
110
  "is-ci": "^3.0.1",
111
  "node-fetch": "^3.3.2",
112
+ "prettier": "^3.4.1",
113
+ "sass-embedded": "^1.81.0",
114
+ "typescript": "^5.7.2",
115
  "unified": "^11.0.5",
116
+ "unocss": "^0.61.9",
117
+ "vite": "^5.4.11",
118
  "vite-plugin-node-polyfills": "^0.22.0",
119
  "vite-plugin-optimize-css-modules": "^1.1.0",
120
  "vite-tsconfig-paths": "^4.3.2",
121
+ "vitest": "^2.1.6",
122
+ "wrangler": "^3.91.0",
123
  "zod": "^3.23.8"
124
  },
125
  "resolutions": {
pnpm-lock.yaml CHANGED
The diff for this file is too large to render. See raw diff