From 2064c83177636236b5163badbee9aa71cb24c755 Mon Sep 17 00:00:00 2001 From: kris1803 Date: Sat, 14 Dec 2024 00:39:27 +0100 Subject: [PATCH 01/67] Fixed console error for SettingsWIndow & Removed ts-nocheck where not needed --- app/commit.json | 2 +- app/components/settings/SettingsWindow.tsx | 2 +- app/lib/.server/llm/api-key.ts | 4 ---- pre-start.cjs | 1 + 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/commit.json b/app/commit.json index beebd2bb..ff64112c 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "55094392cf4c5bc607aff796680ad50236a4cf20" } +{ "commit": "9666b2ab67d25345542722ab9d870b36ad06252e" } diff --git a/app/components/settings/SettingsWindow.tsx b/app/components/settings/SettingsWindow.tsx index aae0a860..9fb615eb 100644 --- a/app/components/settings/SettingsWindow.tsx +++ b/app/components/settings/SettingsWindow.tsx @@ -63,7 +63,7 @@ export const SettingsWindow = ({ open, onClose }: SettingsProps) => { variants={dialogBackdropVariants} /> - + ) { diff --git a/pre-start.cjs b/pre-start.cjs index e6b7001e..841e3eb6 100644 --- a/pre-start.cjs +++ b/pre-start.cjs @@ -7,4 +7,5 @@ console.log(` ★═══════════════════════════════════════★ `); console.log('📍 Current Commit Version:', commit); +console.log(' Please wait until the URL appears here') console.log('★═══════════════════════════════════════★'); \ No newline at end of file From 2d57bd27461c5d63d454f93fb17b001dfdf28211 Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Mon, 16 Dec 2024 18:55:38 -0500 Subject: [PATCH 02/67] add: charactors to the vaild list for chat titles added common punctuation to the charactersValid --- app/lib/hooks/useEditChatDescription.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/hooks/useEditChatDescription.ts b/app/lib/hooks/useEditChatDescription.ts index da07f2cd..5230d6cf 100644 --- a/app/lib/hooks/useEditChatDescription.ts +++ b/app/lib/hooks/useEditChatDescription.ts @@ -92,7 +92,8 @@ export function useEditChatDescription({ } const lengthValid = trimmedDesc.length > 0 && trimmedDesc.length <= 100; - const characterValid = /^[a-zA-Z0-9\s]+$/.test(trimmedDesc); + // Allow letters, numbers, spaces, and common punctuation but exclude characters that could cause issues + const characterValid = /^[a-zA-Z0-9\s\-_.,!?()[\]{}'"]+$/.test(trimmedDesc); if (!lengthValid) { toast.error('Description must be between 1 and 100 characters.'); @@ -100,7 +101,7 @@ export function useEditChatDescription({ } if (!characterValid) { - toast.error('Description can only contain alphanumeric characters and spaces.'); + toast.error('Description can only contain letters, numbers, spaces, and basic punctuation.'); return false; } From 69c0bf5873334c25d691b8db4a995b86125a6799 Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 17 Dec 2024 14:57:16 +0530 Subject: [PATCH 03/67] fix: added wait till terminal prompt for bolt shell execution --- app/commit.json | 2 +- app/utils/shell.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/commit.json b/app/commit.json index 832678f8..2d7a657d 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "1e72d52278730f7d22448be9d5cf2daf12559486", "version": "0.0.2" } +{ "commit": "0ee373629789f01fb9f54f6747735b51a94a5562" } diff --git a/app/utils/shell.ts b/app/utils/shell.ts index 53b450f4..3aad5b33 100644 --- a/app/utils/shell.ts +++ b/app/utils/shell.ts @@ -105,6 +105,7 @@ export class BoltShell { * this.#shellInputStream?.write('\x03'); */ this.terminal.input('\x03'); + await this.waitTillOscCode('prompt'); if (state && state.executionPrms) { await state.executionPrms; @@ -145,6 +146,10 @@ export class BoltShell { terminalOutput.pipeTo( new WritableStream({ write(data) { + /* + * const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; + * console.log('terminal onData', { data,osc }); + */ if (!isInteractive) { const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; From e9e785767528e1ca78b9b09c8ba0b73c37ef368b Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 17 Dec 2024 15:01:00 +0530 Subject: [PATCH 04/67] removed logs --- app/commit.json | 2 +- app/utils/shell.ts | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/commit.json b/app/commit.json index 2d7a657d..85591f47 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "0ee373629789f01fb9f54f6747735b51a94a5562" } +{ "commit": "69c0bf5873334c25d691b8db4a995b86125a6799" } diff --git a/app/utils/shell.ts b/app/utils/shell.ts index 3aad5b33..0ffea422 100644 --- a/app/utils/shell.ts +++ b/app/utils/shell.ts @@ -146,10 +146,6 @@ export class BoltShell { terminalOutput.pipeTo( new WritableStream({ write(data) { - /* - * const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; - * console.log('terminal onData', { data,osc }); - */ if (!isInteractive) { const [, osc] = data.match(/\x1b\]654;([^\x07]+)\x07/) || []; From 206a6d781624bbb79cca765ade38cf4455ce7b4d Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Tue, 17 Dec 2024 10:19:40 -0500 Subject: [PATCH 05/67] add/toc-for-readme added a TOC for the README file, renamed some headings to better suite the TOC --- README.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 84235f8c..02ae4eb4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -[![bolt.diy: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.diy) - # bolt.diy (Previously oTToDev) +[![bolt.diy: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.diy) Welcome to bolt.diy, the official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which 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. @@ -8,12 +7,24 @@ Check the [bolt.diy Docs](https://stackblitz-labs.github.io/bolt.diy/) for more bolt.diy was originally started by [Cole Medin](https://www.youtube.com/@ColeMedin) but has quickly grown into a massive community effort to build the BEST open source AI coding assistant! -## Join the community for bolt.diy! +## Table of Contents -https://thinktank.ottomator.ai +- [Join the Community](#join-the-community) +- [Requested Additions](#requested-additions) +- [Features](#features) +- [Setup](#setup) +- [Run the Application](#run-the-application) +- [Available Scripts](#available-scripts) +- [Contributing](#contributing) +- [Roadmap](#roadmap) +- [FAQ](#faq) + +## Join the community + +[Join our bolt.diy community here!](https://thinktank.ottomator.ai) -## Requested Additions - Feel Free to Contribute! +## Requested Additions - ✅ OpenRouter Integration (@coleam00) - ✅ Gemini Integration (@jonathands) @@ -60,7 +71,7 @@ https://thinktank.ottomator.ai - ⬜ Perplexity Integration - ⬜ Vertex AI Integration -## bolt.diy Features +## Features - **AI-powered full-stack web development** directly in your browser. - **Support for multiple LLMs** with an extensible architecture to integrate additional models. @@ -70,7 +81,7 @@ https://thinktank.ottomator.ai - **Download projects as ZIP** for easy portability. - **Integration-ready Docker support** for a hassle-free setup. -## Setup bolt.diy +## Setup If you're new to installing software from GitHub, don't worry! If you encounter any issues, feel free to submit an "issue" using the provided links or improve this documentation by forking the repository, editing the instructions, and submitting a pull request. The following instruction will help you get the stable branch up and running on your local machine in no time. From 0e7937b835d84811360b8f6fd9941c0c6021634c Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Tue, 17 Dec 2024 10:27:04 -0500 Subject: [PATCH 06/67] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02ae4eb4..9925debb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ bolt.diy was originally started by [Cole Medin](https://www.youtube.com/@ColeMed ## Join the community -[Join our bolt.diy community here!](https://thinktank.ottomator.ai) +[Join the bolt.diy community here, in the thinktank on ottomator.ai!](https://thinktank.ottomator.ai) ## Requested Additions From d327cfea2958c1cf2e053b01c4964daf5adcad22 Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Tue, 17 Dec 2024 21:19:43 +0530 Subject: [PATCH 07/67] feat: added terminal error capturing and automated fix prompt --- app/commit.json | 2 +- app/components/chat/BaseChat.tsx | 429 +++++++++++++++------------- app/components/chat/Chat.client.tsx | 3 + app/components/chat/ChatAlert.tsx | 81 ++++++ app/lib/runtime/action-runner.ts | 88 +++++- app/lib/stores/workbench.ts | 16 +- app/types/actions.ts | 7 + app/utils/shell.ts | 61 +++- 8 files changed, 474 insertions(+), 213 deletions(-) create mode 100644 app/components/chat/ChatAlert.tsx diff --git a/app/commit.json b/app/commit.json index 832678f8..4d68a742 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "1e72d52278730f7d22448be9d5cf2daf12559486", "version": "0.0.2" } +{ "commit": "42bde1cae43de887a6bc5a72f6352a63f65677e6" } diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index 2084cbb3..7879d788 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -28,6 +28,8 @@ import { SpeechRecognitionButton } from '~/components/chat/SpeechRecognition'; import type { IProviderSetting, ProviderInfo } from '~/types/model'; import { ScreenshotStateManager } from './ScreenshotStateManager'; import { toast } from 'react-toastify'; +import type { ActionAlert } from '~/types/actions'; +import ChatAlert from './ChatAlert'; const TEXTAREA_MIN_HEIGHT = 76; @@ -58,6 +60,8 @@ interface BaseChatProps { setUploadedFiles?: (files: File[]) => void; imageDataList?: string[]; setImageDataList?: (dataList: string[]) => void; + actionAlert?: ActionAlert; + clearAlert?: () => void; } export const BaseChat = React.forwardRef( @@ -89,6 +93,8 @@ export const BaseChat = React.forwardRef( imageDataList = [], setImageDataList, messages, + actionAlert, + clearAlert, }, ref, ) => { @@ -313,226 +319,247 @@ export const BaseChat = React.forwardRef( }}
- - - - - - - - - - - - - - - - - - -
-
- - {(providerList || []).length > 0 && provider && ( - { - const newApiKeys = { ...apiKeys, [provider.name]: key }; - setApiKeys(newApiKeys); - Cookies.set('apiKeys', JSON.stringify(newApiKeys)); - }} - /> - )} -
-
- { - setUploadedFiles?.(uploadedFiles.filter((_, i) => i !== index)); - setImageDataList?.(imageDataList.filter((_, i) => i !== index)); - }} - /> - - {() => ( - + {actionAlert && ( + clearAlert?.()} + postMessage={(message) => { + sendMessage?.({} as any, message); + clearAlert?.(); + }} /> )} - +
-