Commit Graph

1465 Commits

Author SHA1 Message Date
Stijnus
9a5076d8c6
feat: lock files (#1681)
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
* Add persistent file locking feature with enhanced UI

* Fix file locking to be scoped by chat ID

* Add folder locking functionality

* Update CHANGES.md to include folder locking functionality

* Add early detection of locked files/folders in user prompts

* Improve locked files detection with smarter pattern matching and prevent AI from attempting to modify locked files

* Add detection for unlocked files to allow AI to continue with modifications in the same chat session

* Implement dialog-based Lock Manager with improved styling for dark/light modes

* Add remaining files for file locking implementation

* refactor(lock-manager): simplify lock management UI and remove scoped lock options

Consolidate lock management UI by removing scoped lock options and integrating LockManager directly into the EditorPanel. Simplify the lock management interface by removing the dialog and replacing it with a tab-based view. This improves maintainability and user experience by reducing complexity and streamlining the lock management process.

Change Lock & Unlock action to use toast instead of alert.

Remove LockManagerDialog as it is now tab based.

* Optimize file locking mechanism for better performance

- Add in-memory caching to reduce localStorage reads
- Implement debounced localStorage writes
- Use Map data structures for faster lookups
- Add batch operations for locking/unlocking multiple items
- Reduce polling frequency and add event-based updates
- Add performance monitoring and cross-tab synchronization

* refactor(file-locking): simplify file locking mechanism and remove scoped locks

This commit removes the scoped locking feature and simplifies the file locking mechanism. The `LockMode` type and related logic have been removed, and all locks are now treated as full locks. The `isLocked` property has been standardized across the codebase, replacing the previous `locked` and `lockMode` properties. Additionally, the `useLockedFilesChecker` hook and `LockAlert` component have been removed as they are no longer needed with the simplified locking system.

This gives the LLM a clear understanding of locked files and strict instructions not to make any changes to these files

* refactor: remove debug console.log statements

---------

Co-authored-by: KevIsDev <zennerd404@gmail.com>
2025-05-08 00:07:32 +02:00
KevIsDev
5c9d413344
Merge pull request #1682 from Stijnus/origin/ACT_BoltDYI_BUGFIX_SEARCH
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
fix: invalid line number error in search functionality
2025-05-04 23:19:38 +01:00
Stijnus
15a84f2e24 Fix invalid line number error in search functionality 2025-05-03 23:54:21 +02:00
KevIsDev
844da4b1c2
Merge pull request #1677 from xKevIsDev/improvements
Some checks failed
Docker Publish / docker-build-publish (push) Has been cancelled
Update Stable Branch / prepare-release (push) Has been cancelled
ci: remove macOS code signing credentials from workflow
2025-05-01 19:33:44 +01:00
KevIsDev
9bf677ce74 ci: remove macOS code signing credentials from workflow
The code signing credentials for macOS were removed from the GitHub Actions workflow and the identity field in the electron-builder.yml was set to null. This change was made to include unsigned .dmg releases
2025-05-01 19:30:51 +01:00
KevIsDev
5224dea39e
Merge pull request #1676 from xKevIsDev/improvements
feat: implement a search functionality to search codebase
2025-05-01 19:18:49 +01:00
KevIsDev
d6a4aff7b7 ci(workflow): re-enable macos-latest in build matrix
Re-enable macos-latest in the build matrix for the Electron workflow. This allows testing on macOS (unsigned .dmg)
2025-05-01 17:27:45 +01:00
KevIsDev
b3e1048fa4 refactor(Search): improve search UX with loader timing and state management
Enhance the search experience by ensuring the loader is displayed for a minimum duration to avoid flickering. Additionally, introduce a `hasSearched` state to accurately display "No results found" only after a search has been performed.
2025-05-01 17:19:29 +01:00
KevIsDev
fcaf8f66f0 feat: enhance error handling and add new search feature
- Add support for `PREVIEW_CONSOLE_ERROR` in WebContainer error handling

- Introduce new Search component for text search functionality

- Extend `ScrollPosition` interface to include `line` and `column`
- Implement scroll-to-line functionality in CodeMirrorEditor
- Add tab-based navigation for files and search in EditorPanel

This commit introduces several enhancements to the editor, including improved error handling, better scrolling capabilities, and a new search feature. The changes are focused on improving the user experience and adding new functionality to the editor components.
2025-05-01 15:56:08 +01:00
KevIsDev
9d5c66cd50
Merge pull request #1675 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
chore: update @webcontainer/api to version 1.6.1-internal.1
fix: fix: make diff button consistent with other toolbar buttons originally fixed in PR #1601 but had been overwritten
2025-05-01 11:56:10 +01:00
KevIsDev
3b2e869651 chore: update @webcontainer/api to version 1.6.1-internal.1
update to latest version of webcontainer

fix: make diff button consistent with other toolbar buttons
2025-05-01 11:51:19 +01:00
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
e6dae47ce4 refactor(prompts): update and refine UI design and content guidelines
Refine the UI design and content guidelines in the prompts to ensure consistency and professionalism. Add detailed instructions for animations, color schemes, typography, and layout.

Remove redundant console log in the LLM stream-text module.
2025-04-30 01:24:31 +01:00
KevIsDev
51762835d5 refactor(llm): simplify streamText function and remove unused code
Remove unused imports, files parameter, and redundant multimodal handling logic. Streamline the function by directly passing processed messages to _streamText. Also, add specific handling to remove package-lock.json content to reduce token usage
2025-04-30 00:50:00 +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
d5ced7e305 refactor: update prompt to be more specific with install and run commands
remove gemini model as this is now fetched dynamically
2025-04-25 00:54:01 +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
3cafbb6f59 feat(prompts): add fine-tuned prompt and update mobile app instructions
Introduce a new fine-tuned prompt for better results and update mobile app development instructions to ensure comprehensive guidance. The changes include enhanced design guidelines, improved database handling, and clearer artifact creation rules for better project setup.
2025-04-24 10:59:29 +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
f06dd8a7b1 docs(prompts): refine and expand design instructions for clarity
Update the design instructions to emphasize the importance of content richness and realistic placeholders. This ensures applications feel functional and visually appealing immediately, avoiding generic templates and empty screens.
2025-04-23 12:40:51 +01:00
KevIsDev
fe37f5ceea refactor: migrate snapshot storage from localStorage to IndexedDB
To improve data consistency and reliability, snapshot storage has been migrated from localStorage to IndexedDB. This change includes adding a new 'snapshots' object store, updating database version to 2, and modifying related functions to use IndexedDB for snapshot operations. The migration ensures better handling of snapshots alongside chat data and removes dependency on localStorage preventing UI lag.
2025-04-23 12:17:06 +01:00
KevIsDev
5c44cb4e00 docs(prompts): update mobile app development instructions and styling guidelines
Refine mobile app development instructions to ensure clarity and consistency. Enhance styling guidelines with detailed design system requirements, including color, typography, and responsive design. Update critical requirements for components, animations, and error handling to align with best practices.
2025-04-22 22:26:29 +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
458c263931 docs(prompts): update mobile app development and design instructions
Refactor and consolidate mobile app development and design guidelines in the prompts files. Remove redundant information and ensure clarity and consistency in the instructions. The changes aim to provide a more structured and concise set of guidelines for developers working on mobile apps using Expo and React Native.
2025-04-22 13:00:03 +01:00
KevIsDev
ffac7bfbfc docs(prompts): update artifact and design instructions
- Clarify critical instructions regarding artifact creation and image files
- Add detailed design instructions for visual identity, UX, and layout
- Include guidance on using Unsplash for stock photos and realistic placeholder content
2025-04-22 11:56:30 +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
3b5d404330 refactor: remove unused qrCodeAtom and update mobile app prompts
Remove the unused `qrCodeAtom` from the QR code store to clean up the codebase. Additionally, update the mobile app development prompts to emphasize critical requirements, such as creating a default route, ensuring high-quality UI/UX, and following Expo best practices.
2025-04-17 13:43:48 +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
682ed764a9 docs(mobile_app_instructions): update project structure and requirements
Clarify the mobile app development process by adding a required home page and emphasizing the importance of following the provided project structure. Remove outdated sections like accessibility, development workflow, and common pitfalls to streamline the instructions.
2025-04-15 21:37:18 +01:00