Commit Graph

483 Commits

Author SHA1 Message Date
KevIsDev
837e64a605
Merge pull request #1651 from xKevIsDev/improvements
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
feat: add expo app creation, enhance ui, and refactor code
2025-04-30 12:48:15 +01:00
KevIsDev
0dd8fb7707 refactor(chat): move modern-scrollbar class to conditional styling
Improves maintainability by moving the 'modern-scrollbar' class to the conditional styling block in BaseChat.tsx, making the code more consistent and easier to manage.
2025-04-30 12:43:54 +01:00
KevIsDev
9454c73992 style: add modern-scrollbar class to improve scrollbar appearance
Introduce the modern-scrollbar class to enhance the visual consistency of scrollbars across the application. This class provides a cleaner and more modern look for scrollbars in WebKit and Firefox browsers.
2025-04-30 12:23:35 +01:00
KevIsDev
e30035cec5 feat(templates): add Vite Shadcn starter template
Introduce a new starter template for Vite with shadcn/ui integration. The template includes React, TypeScript, and Tailwind, and is added to the STARTER_TEMPLATES list. Additionally, update the styling in StarterTemplates component to better accommodate the new template and add the shadcn.svg icon.
2025-04-30 11:37:29 +01:00
KevIsDev
f430443aef refactor: remove debug logging statements
Clean up code by removing unnecessary debug logging statements in `StarterTemplates.tsx` and `useShortcuts.ts`. Making it easier to debug issues in console
2025-04-30 02:11:54 +01:00
KevIsDev
a83f864fa1 refactor): provider dropdown and model selector
Refactor the existing provider selector to improve code clarity and match the model selection dropdown.
2025-04-30 01:57:47 +01:00
KevIsDev
3a894d0516 feat(chat): add dynamic title support for bundled artifacts
Introduce dynamic titles for bundled artifacts based on their state and ID. This improves user experience by providing more context during project creation or restoration. Also, pass the `title` parameter to the `getTemplates` function to customize the artifact title.
2025-04-29 14:37:17 +01:00
KevIsDev
902166efee fix(chat): ensure artifact actions are correctly evaluated for completion
The dependency array in the Artifact component was missing `artifact.type` and `allActionFinished`, which could lead to incorrect evaluation of action completion. Additionally, the logic for determining if all actions are finished was updated to account for 'start' actions that are 'running'. This ensures that the component accurately reflects the state of bundled artifacts.
2025-04-28 14:34:07 +01:00
KevIsDev
cfbc215001 fix(chat): update artifact ID check for restored project setup
The artifact ID check was updated from 'imported-files' to 'restored-project-setup' to correctly identify the restored project setup action. This ensures the UI displays the appropriate message based on the artifact's state.
2025-04-28 14:29:06 +01:00
KevIsDev
42eaa2f5e1 refactor(chat): improve UI layout, artifact handling, and template naming
- Restructured alert components in BaseChat for better layout organization
- Updated artifact component to display dynamic titles based on state
- Simplified template names in constants for better readability
- Enhanced snapshot restoration process by consolidating command actions into a single artifact
2025-04-28 14:03:58 +01:00
KevIsDev
bf03b6f0fe refactor(chat): move ScrollToBottom function outside BaseChat component
Improve code maintainability by relocating the ScrollToBottom function outside the BaseChat component. This reduces complexity and enhances readability.
2025-04-28 11:10:51 +01:00
KevIsDev
65b78280d0 feat(chat): add scroll-to-bottom button for chat messages
Introduce a `ScrollToBottom` component that displays a button when the user is not at the bottom of the chat, allowing them to quickly scroll to the latest message. This improves user experience by making it easier to navigate long chat histories.
2025-04-24 13:31:23 +01:00
KevIsDev
deef4d9c4d style(FilePreview): remove border and adjust styling for better UI consistency
The border around the image was removed to simplify the design, and the bottom text container was updated to include a background color and rounded corners for better visual coherence
2025-04-24 12:08:08 +01:00
KevIsDev
cdabfc3f6f style(chat): update button variants and improve file preview styling
Change button variants from 'outline' to 'default' for consistency across components. Enhance FilePreview component with better spacing, borders, and file name display to improve visual clarity and user experience.
2025-04-24 11:55:14 +01:00
KevIsDev
516dc9dc28 refactor(constants): remove duplicate tag and add 'app' tag
The 'mobile app' tag was duplicated in the STARTER_TEMPLATES array, so it was removed. Additionally, the 'app' tag was added to the React + Vite + typescript template to better categorize it.
2025-04-24 11:17:37 +01:00
KevIsDev
02401b90aa refactor(qr-code): replace react-qr-code with react-qrcode-logo
- Updated package.json and pnpm-lock.yaml to use react-qrcode-logo v3.0.0
- Modified ExpoQrModal.tsx to use the new QRCode component with enhanced styling and logo support
- Removed filtering of lock.json files in useChatHistory.ts and stream-text.ts for consistency
- Updated mobile app instructions in prompts.ts to ensure clarity and alignment with best practices
2025-04-23 16:43:01 +01:00
KevIsDev
b009b02057 refactor(chat): replace useSnapScroll with StickToBottom for smoother scrolling
The useSnapScroll hook has been replaced with the StickToBottom component to improve the scrolling behavior in the chat interface. This change ensures smoother and more consistent scrolling, especially when new messages are added. The StickToBottom component provides better control over the scroll position and handles edge cases more effectively.
2025-04-22 21:33:40 +01:00
KevIsDev
b41691f6f2 feat(previews): add refreshAllPreviews method to refresh all previews
This commit introduces the `refreshAllPreviews` method in the `PreviewsStore` class, which iterates through all previews and triggers a file change broadcast for each. This ensures that all previews are updated after a file save operation.

refactor(CodeBlock): handle unsupported languages by falling back to plaintext

The `CodeBlock` component now defaults to 'plaintext' when an unsupported language is detected, improving the user experience by avoiding unsupported language errors.

prompts: update dependency installation instructions

The prompts documentation has been updated to clarify the process of installing dependencies, emphasizing the importance of updating `package.json` first and avoiding individual package installations.
2025-04-22 20:42:38 +01:00
KevIsDev
443dc646fb refactor(files): optimize file deletion logic for better performance
Refactor the file deletion logic in FilesStore to precompute prefixes and iterate through files only once. This reduces the complexity of nested loops and improves performance by applying all deletions in a single update to the store. Additionally, remove a redundant console.log statement in Chat.client.tsx and update the prompts documentation for clarity.
2025-04-19 12:57:14 +01:00
KevIsDev
9b4736921f refactor(workbench): simplify URL handling and improve PortDropdown UI
- Replace `url` state with `displayPath` in Preview component to focus on path handling
- Update PortDropdown to display active port and improve styling
- Remove redundant URL validation logic
2025-04-19 00:47:14 +01:00
KevIsDev
685677b986 style(icons): update icon classes and add netlify.svg
Update icon classes across multiple components to improve consistency and add the netlify.svg file for the Netlify icon.
2025-04-19 00:05:04 +01:00
Leex
81168093cf
Merge pull request #1601 from mark-when/overflow
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
fix: make diff button consistent with other toolbar buttons
2025-04-19 00:20:00 +02:00
KevIsDev
adcdc8efdf feat(llm): add new models for xAI and Google providers
Add 'grok-3-beta' to xAI provider and 'gemini-2.5-flash-preview-04-17' to Google provider. Also, ensure file saving when content is updated in WorkbenchStore and update streaming indicator styling in chat messages.
2025-04-18 13:45:11 +01:00
KevIsDev
c08be2f1fb refactor: move qrCodeStore to lib/stores for better organization
The qrCodeStore has been relocated from the app/stores directory to app/lib/stores to maintain a more consistent and organized project structure. This change improves maintainability by centralizing store-related files in a dedicated directory.
2025-04-18 11:45:14 +01:00
KevIsDev
f90fd79064 feat(chat): add new example prompt for bolt.diy app
This commit introduces a new example prompt in the chat component to guide users in creating a mobile app about bolt.diy
2025-04-17 14:54:50 +01:00
KevIsDev
9039653ae0 feat: add Expo QR code generation and modal for mobile preview
Introduce Expo QR code functionality to allow users to preview their projects on mobile devices. Added a new QR code modal component, integrated it into the chat and preview components, and implemented Expo URL detection in the shell process. This enhances the mobile development workflow by providing a seamless way to test Expo projects directly on devices.

- Clean up and consolidate Preview icon buttons while removing redundant ones.
2025-04-17 13:03:41 +01:00
KevIsDev
cbc22cdbdb style(chat): adjust spacing and margins in chat components
- Reduce gap between elements in BaseChat component from `gap-4` to `gap-2`
- Remove bottom margin from AssistantMessage component for cleaner layout
- Add expo.svg icon to the icons directory for future use
2025-04-16 13:17:55 +01:00
KevIsDev
3ca85875f1 feat(chat): adjust chat layout and add rewind/fork functionality
- Modify chat max/min width for better responsiveness
- Update UserMessage and AssistantMessage components for improved alignment
- Add rewind and fork functionality to AssistantMessage
- Refactor Artifact component to handle bundled artifacts more clearly
2025-04-15 22:54:00 +01:00
KevIsDev
76ed2bef69 style: fix code formatting and remove unused imports
- Fix indentation in Preview.tsx and normalize quotes
- Remove unused import in selectStarterTemplate.ts
- Improve code readability in api.github-template.ts
2025-04-15 15:33:12 +01:00
KevIsDev
63129a93cd feat: add webcontainer connect route and new preview functionality
- Add new route `webcontainer.connect.$id.tsx` for WebContainer connection
- Implement `openInNewTab` function in `Preview.tsx` for opening previews in new tabs
- Update GitHub template fetching logic to include lock files for improved install times
- Add new Expo starter template to constants
- Extend prompts with mobile app development instructions
-Templates now use Releases from github as a work around for rate limits
2025-04-15 15:32:40 +01:00
Stijnus
0202aefad9
feat: fix for push private repo (#1618)
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
Mark Stale Issues and Pull Requests / stale (push) Has been cancelled
* feat: push private repo

# GitHub Integration Changelog

## Fixed
- Fixed issue where repositories marked as private weren't being created with private visibility
- Added support for changing repository visibility (public/private) when pushing to existing repositories
- Fixed 404 errors when pushing files after changing repository visibility

## Added
- Added clear user warnings when changing repository visibility from public to private or vice versa
- Implemented delays after visibility changes to allow GitHub API to fully process the change
- Added retry mechanism (up to 3 attempts with increasing delays) for pushing files after visibility changes
- Added repository data refresh before pushing to ensure latest reference data

## Improved
- Enhanced error logging and handling for all GitHub API operations
- Updated return value handling to use actual repository URLs from the API response
- Added comprehensive logging to track repository creation and update operations

* cleanup

* Update Workbench.client.tsx
2025-04-08 22:20:54 +02:00
Stijnus
552f08acea
feat: update connectiontab and datatab security fix (#1614)
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
* feat: update connectiontab and datatab security fix

# Connection Components and Diagnostics Updates

## GitHub Connection Component Changes
- Updated the disconnect button styling to match Vercel's design:
  - Changed from `<Button>` component to native `<button>` element
  - Added red background (`bg-red-500`) with hover effect (`hover:bg-red-600`)
  - Updated icon from `i-ph:sign-out` to `i-ph:plug`
  - Simplified text to just "Disconnect"
  - Added connection status indicator with check-circle icon and "Connected to GitHub" text

## ConnectionDiagnostics Tab Updates
### Added New Connection Diagnostics
- Implemented diagnostics for Vercel and Supabase connections
- Added new helper function `safeJsonParse` for safer JSON parsing operations

### Diagnostic Checks Added
- **Vercel Diagnostics:**
  - LocalStorage token verification
  - API endpoint connectivity test
  - Connection status validation
  - Reset functionality for Vercel connection

- **Supabase Diagnostics:**
  - LocalStorage credentials verification
  - API endpoint connectivity test
  - Connection status validation
  - Reset functionality for Supabase connection

### UI Enhancements
- Added new status cards for Vercel and Supabase
- Implemented reset buttons with consistent styling
- Added loading states during diagnostics
- Enhanced error handling and user feedback

### Function Updates
- Extended `runDiagnostics` function to include Vercel and Supabase checks
- Added new reset helper functions for each connection type
- Improved error handling and status reporting
- Enhanced toast notifications for better user feedback

### Visual Consistency
- Matched styling of new diagnostic cards with existing GitHub and Netlify cards
- Consistent use of icons and status indicators
- Uniform button styling across all connection types
- Maintained consistent spacing and layout patterns

### Code Structure
- Organized diagnostic checks into clear, separate sections
- Improved error handling and type safety
- Enhanced code readability and maintainability
- Added comprehensive status compilation for all connections

These changes ensure a consistent user experience across all connection types while providing robust diagnostic capabilities for troubleshooting connection issues.

# DataTab.tsx Changes

## Code Cleanup
- Removed unused variables from useDataOperations hook:
  - Removed `handleExportAPIKeys`
  - Removed `handleUndo`
  - Removed `lastOperation`

This change improves code quality by removing unused variables and resolves ESLint warnings without affecting any functionality.

* Test commit to verify pre-commit hook
2025-04-08 13:06:43 +02:00
KevIsDev
8c70dd6123
Merge pull request #1613 from xKevIsDev/vercel-fix
refactor: remove success toast and prioritize public domain URL
2025-04-08 11:56:00 +01:00
KevIsDev
8d1d1506ad
Merge pull request #1602 from mark-when/overflow2
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
feat: consolidate sync & export items into an overflow menu
2025-04-07 23:20:41 +01:00
KevIsDev
03349f8517 refactor: remove success toast and prioritize public domain URL
Remove redundant success toast messages from Vercel and Netlify deploy components. Additionally, prioritize the public domain URL over the private domain in the Vercel deploy action for consistency and clarity.
2025-04-07 23:07:58 +01:00
KevIsDev
6996b807d5
Merge pull request #1590 from xKevIsDev/main
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
fix: simplify the SHA-1 hash function in netlify deploy by using the crypto module directly
2025-04-07 12:19:02 +01:00
KevIsDev
b3d753dcc9
Merge pull request #1598 from mark-when/filetypes
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
fix: whitelist vue and svelte files
2025-04-06 22:45:02 +01:00
Stijnus
b54d160a3b
feat: bulk delete chats from sidebar (#1586)
* feat: Bulk Delete Chats from Sidebar

feat(sidebar): Implement bulk chat deletion

Adds the ability for users to select multiple chats from the history sidebar and delete them in bulk.

**Key Changes:**

*   **Selection Mode:** Introduced a selection mode toggled by a dedicated button next to "Start new chat".
*   **Checkboxes:** Added checkboxes to each `HistoryItem` visible only when selection mode is active.
*   **Bulk Actions:** Added "Select All" / "Deselect All" and "Delete Selected" buttons (`Button` component with `ghost` variant) that appear above the chat list in selection mode.
*   **Confirmation Dialog:** Implemented a confirmation dialog (`Dialog` component) to prevent accidental deletion, listing the chats selected for removal.
*   **Deletion Logic:** Updated `Menu.client.tsx` to handle the selection state and perform bulk deletion using `deleteById` from persistence layer.
*   **Styling:** Ensured all new UI elements (`Checkbox`, `Button`) adhere to the existing project design system and support both light and dark themes using appropriate CSS classes and UnoCSS icons (`i-ph:` prefix).
*   **Refinement:** Replaced initial plain `<button>` elements with the project's `Button` component for consistency. Fixed incorrect icon prefixes.

* Fix selection and Dark mode
2025-04-06 20:36:53 +02:00
Rob Koch
ba9de84ac4 consolidate sync & export items into an overflow menu 2025-04-04 21:09:09 -07:00
Rob Koch
6942fba4a8 make diff button consistent with other toolbar buttonss 2025-04-04 19:15:18 -07:00
Rob Koch
be54fa0037 whitelist vue and svelte files 2025-04-04 05:54:34 -07:00
KevIsDev
33305c4326 feat(deploy): add deploy alert system for build and deployment status
Introduce a new `DeployAlert` interface and related components to provide visual feedback on build and deployment stages. This includes status updates for Vercel and Netlify deployments, with progress visualization and error handling. The changes enhance user experience by offering real-time updates during the deployment process.
2025-04-04 11:22:56 +01:00
KevIsDev
c63732d2f4 fix: simplify the SHA-1 hash function in api.netlify-deploy.ts by using the crypto module directly this allows it to work in both dev and prod environments.
also extract Netlify and Vercel deploy logic into separate components

Move the Netlify and Vercel deployment logic from HeaderActionButtons.client.tsx into dedicated components (NetlifyDeploy.client.tsx and VercelDeploy.client.tsx) to improve code maintainability and reusability.
2025-04-02 16:47:04 +01:00
KevIsDev
7c18e7ddf6
Merge branch 'main' into main 2025-03-31 10:31:40 +01:00
Stijnus
24ca7be11b
feat: rework Task Manager Real Data (#1483)
Some checks are pending
Docker Publish / docker-build-publish (push) Waiting to run
Update Stable Branch / prepare-release (push) Waiting to run
* Update TaskManagerTab.tsx

* Rework Taskmanager

* bug fixes

* Update TaskManagerTab.tsx
2025-03-29 21:40:17 +01:00
Stijnus
0487ed1438
feat: new improvement for the GitHub API Authentication Fix (#1537)
* Add environment variables section to ConnectionsTab and fallback token to git-info

* Add remaining code from original branch

* Import Repo Fix

* refactor the UI

* add a rate limit counter

* Update GithubConnection.tsx

* Update NetlifyConnection.tsx

* fix: ui style

* Sync with upstream and preserve GitHub connection and DataTab fixes

* fix disconnect buttons

* revert commits

* Update api.git-proxy.$.ts

* Update api.git-proxy.$.ts
2025-03-29 21:12:47 +01:00
Stijnus
1c561a0615
feat: bolt dyi preview final (#1569)
* V1

## [Unreleased] - 2025-03-28

###  Fixed
- Fixed deployment errors on Cloudflare Pages caused by:
  - Missing or outdated `compatibility_date` and `compatibility_flags` in `wrangler.toml`
  - Use of Node.js built-ins (`crypto`, `stream`) in functions without proper polyfilling
  - Invalid Wrangler CLI options (`--log-level`) used during deployment
  - Type error when importing the Remix server build

### 🛠 Changed
- `wrangler.toml` updated:
  ```toml
  name = "bolt"
  compatibility_date = "2025-03-28"
  compatibility_flags = ["nodejs_compat"]
  pages_build_output_dir = "./build/client"
  send_metrics = false
  ```
- `functions/[[path]].ts` updated:
  ```ts
  import type { ServerBuild } from '@remix-run/cloudflare';
  import { createPagesFunctionHandler } from '@remix-run/cloudflare-pages';
  import * as serverBuild from '../build/server';

  export const onRequest = createPagesFunctionHandler({
    build: serverBuild as unknown as ServerBuild,
  });
  ```

### 🚀 Deployment
- Successful deployment to:
  - Preview: https://979e2ca9.bolt-55b.pages.dev
  - Production: https://main.bolt-55b.pages.dev

* V1

## [Unreleased] - 2025-03-28

###  Fixed
- Fixed deployment errors on Cloudflare Pages caused by:
  - Missing or outdated `compatibility_date` and `compatibility_flags` in `wrangler.toml`
  - Use of Node.js built-ins (`crypto`, `stream`) in functions without proper polyfilling
  - Invalid Wrangler CLI options (`--log-level`) used during deployment
  - Type error when importing the Remix server build

### 🛠 Changed
- `wrangler.toml` updated:
  ```toml
  name = "bolt"
  compatibility_date = "2025-03-28"
  compatibility_flags = ["nodejs_compat"]
  pages_build_output_dir = "./build/client"
  send_metrics = false
  ```
- `functions/[[path]].ts` updated:
  ```ts
  import type { ServerBuild } from '@remix-run/cloudflare';
  import { createPagesFunctionHandler } from '@remix-run/cloudflare-pages';
  import * as serverBuild from '../build/server';

  export const onRequest = createPagesFunctionHandler({
    build: serverBuild as unknown as ServerBuild,
  });
  ```

### 🚀 Deployment
- Successful deployment to:
  - Preview: https://979e2ca9.bolt-55b.pages.dev
  - Production: https://main.bolt-55b.pages.dev

* feat: small bugfix

* Update Preview.tsx
2025-03-29 20:57:41 +01:00
Stijnus
b86fd63700
feat: bolt dyi datatab (#1570)
* Update DataTab.tsx

## API Key Import Fix

We identified and fixed an issue with the API key import functionality in the DataTab component. The problem was that API keys were being stored in localStorage instead of cookies, and the key format was being incorrectly processed.

### Changes Made:

1. **Updated `handleImportAPIKeys` function**:
   - Changed to store API keys in cookies instead of localStorage
   - Modified to use provider names directly as keys (e.g., "OpenAI", "Google")
   - Added logic to skip comment fields (keys starting with "_")
   - Added page reload after successful import to apply changes immediately

2. **Updated `handleDownloadTemplate` function**:
   - Changed template format to use provider names as keys
   - Added explanatory comment in the template
   - Removed URL-related keys that weren't being used properly

3. **Fixed template format**:
   - Template now uses the correct format with provider names as keys
   - Added support for all available providers including Hyperbolic

These changes ensure that when users download the template, fill it with their API keys, and import it back, the keys are properly stored in cookies with the correct format that the application expects.

* backwards compatible old import template

* Update the export / import settings

Settings Export/Import Improvements
We've completely redesigned the settings export and import functionality to ensure all application settings are properly backed up and restored:
Key Improvements
Comprehensive Export Format: Now captures ALL settings from both localStorage and cookies, organized into logical categories (core, providers, features, UI, connections, debug, updates)
Robust Import System: Automatically detects format version and handles both new and legacy formats with detailed error handling
Complete Settings Coverage: Properly exports and imports settings from ALL tabs including:
Local provider configurations (Ollama, LMStudio, etc.)
Cloud provider API keys (OpenAI, Anthropic, etc.)
Feature toggles and preferences
UI configurations and tab settings
Connection settings (GitHub, Netlify)
Debug configurations and logs
Technical Details
Added version tracking to export files for better compatibility
Implemented fallback mechanisms if primary import methods fail
Added detailed logging for troubleshooting import/export issues
Created helper functions for safer data handling
Maintained backward compatibility with older export formats

Feature Settings:
Feature flags and viewed features
Developer mode settings
Energy saver mode configurations
User Preferences:
User profile information
Theme settings
Tab configurations
Connection Settings:
Netlify connections
Git authentication credentials
Any other service connections
Debug and System Settings:
Debug flags and acknowledged issues
Error logs and event logs
Update settings and preferences

* Update DataTab.tsx

* Update GithubConnection.tsx

revert the code back as asked

* feat: enhance style to match the project

* feat:small improvements

* feat: add major improvements

* Update Dialog.tsx

* Delete DataTab.tsx.bak

* feat: small updates

* Update DataVisualization.tsx

* feat: dark mode fix
2025-03-29 20:43:07 +01:00
KevIsDev
4b0eaf25ce add: add env masking extension for .env files
Introduce a new extension for CodeMirror that masks sensitive values in .env files. This ensures that sensitive information like API keys or passwords is not displayed in plain text within the editor. The extension dynamically applies masking to values in lines matching the KEY=VALUE format, improving security during development.
2025-03-27 18:52:13 +00:00
KevIsDev
687b03ba74 feat: add Vercel integration for project deployment
This commit introduces Vercel integration, enabling users to deploy projects directly to Vercel. It includes:
- New Vercel types and store for managing connections and stats.
- A VercelConnection component for managing Vercel account connections.
- A VercelDeploymentLink component for displaying deployment links.
- API routes for handling Vercel deployments.
- Updates to the HeaderActionButtons component to support Vercel deployment.

The integration allows users to connect their Vercel accounts, view project stats, and deploy projects with ease.
2025-03-27 00:06:10 +00:00