Merge branch 'main' into terminal-error-detection

This commit is contained in:
Anirban Kar 2024-12-18 20:19:59 +05:30
commit 3d8abee511
3 changed files with 14 additions and 37 deletions

View File

@ -95,34 +95,6 @@ Clone the repository using Git:
git clone -b stable https://github.com/stackblitz-labs/bolt.diy
```
### (Optional) Configure Environment Variables
Most environment variables can be configured directly through the settings menu of the application. However, if you need to manually configure them:
1. Rename `.env.example` to `.env.local`.
2. Add your LLM API keys. For example:
```env
GROQ_API_KEY=YOUR_GROQ_API_KEY
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY
```
**Note**: Ollama does not require an API key as it runs locally.
3. Optionally, set additional configurations:
```env
# Debugging
VITE_LOG_LEVEL=debug
# Ollama settings (example: 8K context, localhost port 11434)
OLLAMA_API_BASE_URL=http://localhost:11434
DEFAULT_NUM_CTX=8192
```
**Important**: Do not commit your `.env.local` file to version control. This file is already included in `.gitignore`.
---
## Run the Application
@ -155,27 +127,30 @@ DEFAULT_NUM_CTX=8192
Use the provided NPM scripts:
```bash
npm run dockerbuild # Development build
npm run dockerbuild:prod # Production build
npm run dockerbuild
```
Alternatively, use Docker commands directly:
```bash
docker build . --target bolt-ai-development # Development build
docker build . --target bolt-ai-production # Production build
docker build . --target bolt-ai-development
```
2. **Run the Container**:
Use Docker Compose profiles to manage environments:
```bash
docker-compose --profile development up # Development
docker-compose --profile production up # Production
docker-compose --profile development up
```
- With the development profile, changes to your code will automatically reflect in the running container (hot reloading).
---
### Entering API Keys
All of your API Keys can be configured directly in the application. Just selecte the provider you want from the dropdown and click the pencile icon to enter your API key.
---
### Update Your Local Version to the Latest
To keep your local version of bolt.diy up to date with the latest changes, follow these steps for your operating system:

View File

@ -1 +1 @@
{ "commit": "d327cfea2958c1cf2e053b01c4964daf5adcad22" }
{ "commit": "fd193ee7d75080ac62d51cd6b1ebbf30942eac89" }

View File

@ -92,7 +92,9 @@ 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 +102,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;
}