diff --git a/.env.example b/.env.example index 7306f36..5baa3d4 100644 --- a/.env.example +++ b/.env.example @@ -70,6 +70,11 @@ LMSTUDIO_API_BASE_URL= # You only need this environment variable set if you want to use xAI models XAI_API_KEY= +# Get your Perplexity API Key here - +# https://www.perplexity.ai/settings/api +# You only need this environment variable set if you want to use Perplexity models +PERPLEXITY_API_KEY= + # Include this environment variable if you want more logging for debugging locally VITE_LOG_LEVEL=debug diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 304b140..bdb02ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to oTToDev +# Contributing to bolt.diy -First off, thank you for considering contributing to Bolt.diy! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make Bolt.diy a better tool for developers worldwide. +First off, thank you for considering contributing to bolt.diy! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make bolt.diy a better tool for developers worldwide. ## 📋 Table of Contents - [Code of Conduct](#code-of-conduct) diff --git a/FAQ.md b/FAQ.md index c9467bb..ecd4158 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,12 +1,12 @@ -[![Bolt.new: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.new) +[![bolt.diy: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.diy) -# Bolt.new Fork by Cole Medin - Bolt.diy +# bolt.diy ## FAQ -### How do I get the best results with Bolt.diy? +### How do I get the best results with bolt.diy? -- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly. +- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure bolt scaffolds the project accordingly. - **Use the enhance prompt icon**: Before sending your prompt, try clicking the 'enhance' icon to have the AI model help you refine your prompt, then edit the results before submitting. @@ -14,36 +14,29 @@ - **Batch simple instructions**: Save time by combining simple instructions into one message. For example, you can ask Bolt.diy to change the color scheme, add mobile responsiveness, and restart the dev server, all in one go saving you time and reducing API credit consumption significantly. -### Do you plan on merging Bolt.diy back into the official Bolt.new repo? - -More news coming on this coming early next month - stay tuned! - ### Why are there so many open issues/pull requests? -Bolt.diy was started simply to showcase how to edit an open source project and to do something cool with local LLMs on my (@ColeMedin) YouTube channel! However, it quickly -grew into a massive community project that I am working hard to keep up with the demand of by forming a team of maintainers and getting as many people involved as I can. -That effort is going well and all of our maintainers are ABSOLUTE rockstars, but it still takes time to organize everything so we can efficiently get through all -the issues and PRs. But rest assured, we are working hard and even working on some partnerships behind the scenes to really help this project take off! +bolt.diy was started simply to showcase how to edit an open source project and to do something cool with local LLMs on my (@ColeMedin) YouTube channel! However, it quickly grew into a massive community project that I am working hard to keep up with the demand of by forming a team of maintainers and getting as many people involved as I can. That effort is going well and all of our maintainers are ABSOLUTE rockstars, but it still takes time to organize everything so we can efficiently get through all the issues and PRs. But rest assured, we are working hard and even working on some partnerships behind the scenes to really help this project take off! -### How do local LLMs fair compared to larger models like Claude 3.5 Sonnet for Bolt.diy/Bolt.new? +### How do local LLMs fair compared to larger models like Claude 3.5 Sonnet for bolt.diy/bolt.new? As much as the gap is quickly closing between open source and massive close source models, you’re still going to get the best results with the very large models like GPT-4o, Claude 3.5 Sonnet, and DeepSeek Coder V2 236b. This is one of the big tasks we have at hand - figuring out how to prompt better, use agents, and improve the platform as a whole to make it work better for even the smaller local LLMs! ### I'm getting the error: "There was an error processing this request" -If you see this error within Bolt.diy, that is just the application telling you there is a problem at a high level, and this could mean a number of different things. To find the actual error, please check BOTH the terminal where you started the application (with Docker or pnpm) and the developer console in the browser. For most browsers, you can access the developer console by pressing F12 or right clicking anywhere in the browser and selecting “Inspect”. Then go to the “console” tab in the top right. +If you see this error within bolt.diy, that is just the application telling you there is a problem at a high level, and this could mean a number of different things. To find the actual error, please check BOTH the terminal where you started the application (with Docker or pnpm) and the developer console in the browser. For most browsers, you can access the developer console by pressing F12 or right clicking anywhere in the browser and selecting “Inspect”. Then go to the “console” tab in the top right. ### I'm getting the error: "x-api-key header missing" -We have seen this error a couple times and for some reason just restarting the Docker container has fixed it. This seems to be Ollama specific. Another thing to try is try to run Bolt.diy with Docker or pnpm, whichever you didn’t run first. We are still on the hunt for why this happens once and a while! +We have seen this error a couple times and for some reason just restarting the Docker container has fixed it. This seems to be Ollama specific. Another thing to try is try to run bolt.diy with Docker or pnpm, whichever you didn’t run first. We are still on the hunt for why this happens once and a while! -### I'm getting a blank preview when Bolt.diy runs my app! +### I'm getting a blank preview when bolt.diy runs my app! -We promise you that we are constantly testing new PRs coming into Bolt.diy and the preview is core functionality, so the application is not broken! When you get a blank preview or don’t get a preview, this is generally because the LLM hallucinated bad code or incorrect commands. We are working on making this more transparent so it is obvious. Sometimes the error will appear in developer console too so check that as well. +We promise you that we are constantly testing new PRs coming into bolt.diy and the preview is core functionality, so the application is not broken! When you get a blank preview or don’t get a preview, this is generally because the LLM hallucinated bad code or incorrect commands. We are working on making this more transparent so it is obvious. Sometimes the error will appear in developer console too so check that as well. ### How to add a LLM: -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. +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. By default, Anthropic, OpenAI, Groq, and Ollama are implemented as providers, but the YouTube video for this repo covers how to extend this to work with more providers if you wish! diff --git a/README.md b/README.md index 44852f6..405e388 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -[![Bolt.diy: AI-Powered Full-Stack Web Development in the Browser](./public/social_preview_index.jpg)](https://bolt.diy) +[![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 (Previously oTToDev) -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. +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. -Check the [Bolt.diy Docs](https://stackblitz-labs.github.io/bolt.diy/) for more information. This documentation is still being updated after the transfer. +Check the [bolt.diy Docs](https://stackblitz-labs.github.io/bolt.diy/) for more information. This documentation is still being updated after the transfer. -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! +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! +## Join the community for bolt.diy! https://thinktank.ottomator.ai @@ -20,7 +20,7 @@ https://thinktank.ottomator.ai - ✅ Autogenerate Ollama models from what is downloaded (@yunatamos) - ✅ Filter models by provider (@jasonm23) - ✅ Download project as ZIP (@fabwaseem) -- ✅ Improvements to the main Bolt.new prompt in `app\lib\.server\llm\prompts.ts` (@kofi-bhr) +- ✅ Improvements to the main bolt.new prompt in `app\lib\.server\llm\prompts.ts` (@kofi-bhr) - ✅ DeepSeek API Integration (@zenith110) - ✅ Mistral API Integration (@ArulGandhi) - ✅ "Open AI Like" API Integration (@ZerxZ) @@ -43,9 +43,9 @@ https://thinktank.ottomator.ai - ✅ Mobile friendly (@qwikode) - ✅ Better prompt enhancing (@SujalXplores) - ✅ Attach images to prompts (@atrokhym) -- ✅ Detect package.json and commands to auto install and run preview for folder and git import (@wonderwhy-er) +- ✅ Detect package.json and commands to auto install & run preview for folder and git import (@wonderwhy-er) - ✅ Selection tool to target changes visually (@emcconnell) -- ⬜ **HIGH PRIORITY** - Prevent Bolt from rewriting files as often (file locking and diffs) +- ⬜ **HIGH PRIORITY** - Prevent bolt from rewriting files as often (file locking and diffs) - ⬜ **HIGH PRIORITY** - Better prompting for smaller LLMs (code window sometimes doesn't start) - ⬜ **HIGH PRIORITY** - Run agents in the backend as opposed to a single model call - ⬜ Deploy directly to Vercel/Netlify/other similar platforms @@ -57,7 +57,7 @@ https://thinktank.ottomator.ai - ⬜ Perplexity Integration - ⬜ Vertex AI Integration -## Bolt.diy Features +## bolt.diy Features - **AI-powered full-stack web development** directly in your browser. - **Support for multiple LLMs** with an extensible architecture to integrate additional models. @@ -67,7 +67,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 bolt.diy 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. @@ -175,7 +175,7 @@ DEFAULT_NUM_CTX=8192 ### 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: +To keep your local version of bolt.diy up to date with the latest changes, follow these steps for your operating system: #### 1. **Navigate to your project folder** Navigate to the directory where you cloned the repository and open a terminal: @@ -201,34 +201,36 @@ To keep your local version of Bolt.diy up to date with the latest changes, follo pnpm run dev ``` -This ensures that you're running the latest version of Bolt.diy and can take advantage of all the newest features and bug fixes. +This ensures that you're running the latest version of bolt.diy and can take advantage of all the newest features and bug fixes. --- -## Available Scripts +## Available Scripts -Here are the available commands for managing the application: +- **`pnpm run dev`**: Starts the development server. +- **`pnpm run build`**: Builds the project. +- **`pnpm run start`**: Runs the built application locally using Wrangler Pages. +- **`pnpm run preview`**: Builds and runs the production build locally. +- **`pnpm test`**: Runs the test suite using Vitest. +- **`pnpm run typecheck`**: Runs TypeScript type checking. +- **`pnpm run typegen`**: Generates TypeScript types using Wrangler. +- **`pnpm run deploy`**: Deploys the project to Cloudflare Pages. +- **`pnpm run lint:fix`**: Automatically fixes linting issues. -- `pnpm run dev`: Start the development server. -- `pnpm run build`: Build the project. -- `pnpm run start`: Run the built application locally (uses Wrangler Pages). -- `pnpm run preview`: Build and start the application locally for production testing. -- `pnpm test`: Run the test suite using Vitest. -- `pnpm run typecheck`: Perform TypeScript type checking. -- `pnpm run typegen`: Generate TypeScript types using Wrangler. -- `pnpm run deploy`: Build and deploy the project to Cloudflare Pages. -- `pnpm lint:fix`: Run the linter and automatically fix issues. +--- -## How do I contribute to Bolt.diy? +## Contributing -[Please check out our dedicated page for contributing to Bolt.diy here!](CONTRIBUTING.md) +We welcome contributions! Check out our [Contributing Guide](CONTRIBUTING.md) to get started. -## What are the future plans for Bolt.diy? +--- -[Check out our Roadmap here!](https://roadmap.sh/r/ottodev-roadmap-2ovzo) +## Roadmap -Lot more updates to this roadmap coming soon! +Explore upcoming features and priorities on our [Roadmap](https://roadmap.sh/r/ottodev-roadmap-2ovzo). + +--- ## FAQ -[Please check out our dedicated page for FAQ's related to Bolt.diy here!](FAQ.md) +For answers to common questions, visit our [FAQ Page](FAQ.md). diff --git a/app/commit.json b/app/commit.json index 018af74..d39a980 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "2e05270bab264d7ee83d7a1dd5408c969f648a68" } +{ "commit": "6ba93974a02a98c83badf2f0002ff4812b8f75a9" } diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index 09f3c16..162241d 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -27,6 +27,7 @@ import { ModelSelector } from '~/components/chat/ModelSelector'; import { SpeechRecognitionButton } from '~/components/chat/SpeechRecognition'; import type { IProviderSetting, ProviderInfo } from '~/types/model'; import { ScreenshotStateManager } from './ScreenshotStateManager'; +import { toast } from 'react-toastify'; const TEXTAREA_MIN_HEIGHT = 76; @@ -492,22 +493,16 @@ export const BaseChat = React.forwardRef( className={classNames( 'transition-all', enhancingPrompt ? 'opacity-100' : '', - promptEnhanced ? 'text-bolt-elements-item-contentAccent' : '', - promptEnhanced ? 'pr-1.5' : '', - promptEnhanced ? 'enabled:hover:bg-bolt-elements-item-backgroundAccent' : '', )} - onClick={() => enhancePrompt?.()} + onClick={() => { + enhancePrompt?.(); + toast.success('Prompt enhanced!'); + }} > {enhancingPrompt ? ( - <> -
-
Enhancing prompt...
- +
) : ( - <> -
- {promptEnhanced &&
Prompt enhanced
} - +
)} diff --git a/app/components/settings/SettingsWindow.tsx b/app/components/settings/SettingsWindow.tsx index aae0a86..541323f 100644 --- a/app/components/settings/SettingsWindow.tsx +++ b/app/components/settings/SettingsWindow.tsx @@ -27,8 +27,8 @@ export const SettingsWindow = ({ open, onClose }: SettingsProps) => { const tabs: { id: TabType; label: string; icon: string; component?: ReactElement }[] = [ { id: 'chat-history', label: 'Chat History', icon: 'i-ph:book', component: }, { id: 'providers', label: 'Providers', icon: 'i-ph:key', component: }, - { id: 'features', label: 'Features', icon: 'i-ph:star', component: }, { id: 'connection', label: 'Connection', icon: 'i-ph:link', component: }, + { id: 'features', label: 'Features', icon: 'i-ph:star', component: }, ...(debug ? [ { diff --git a/app/components/settings/chat-history/ChatHistoryTab.tsx b/app/components/settings/chat-history/ChatHistoryTab.tsx index 76a0f21..bd98f3d 100644 --- a/app/components/settings/chat-history/ChatHistoryTab.tsx +++ b/app/components/settings/chat-history/ChatHistoryTab.tsx @@ -22,17 +22,20 @@ export default function ChatHistoryTab() { }; const handleDeleteAllChats = async () => { + const confirmDelete = window.confirm("Are you sure you want to delete all chats? This action cannot be undone."); + if (!confirmDelete) { + return; // Exit if the user cancels + } + if (!db) { const error = new Error('Database is not available'); logStore.logError('Failed to delete chats - DB unavailable', error); toast.error('Database is not available'); - return; } try { setIsDeleting(true); - const allChats = await getAll(db); await Promise.all(allChats.map((chat) => deleteById(db!, chat.id))); logStore.logSystem('All chats deleted successfully', { count: allChats.length }); @@ -52,7 +55,6 @@ export default function ChatHistoryTab() { const error = new Error('Database is not available'); logStore.logError('Failed to export chats - DB unavailable', error); toast.error('Database is not available'); - return; } diff --git a/app/components/settings/debug/DebugTab.tsx b/app/components/settings/debug/DebugTab.tsx index e18607d..fea78c8 100644 --- a/app/components/settings/debug/DebugTab.tsx +++ b/app/components/settings/debug/DebugTab.tsx @@ -1,6 +1,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { useSettings } from '~/lib/hooks/useSettings'; import commit from '~/commit.json'; +import { toast } from 'react-toastify'; interface ProviderStatus { name: string; @@ -27,14 +28,20 @@ interface IProviderConfig { name: string; settings: { enabled: boolean; + baseUrl?: string; }; } +interface CommitData { + commit: string; +} + const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike']; const versionHash = commit.commit; const GITHUB_URLS = { original: 'https://api.github.com/repos/stackblitz-labs/bolt.diy/commits/main', fork: 'https://api.github.com/repos/Stijnus/bolt.new-any-llm/commits/main', + commitJson: (branch: string) => `https://raw.githubusercontent.com/stackblitz-labs/bolt.diy/${branch}/app/commit.json`, }; function getSystemInfo(): SystemInfo { @@ -199,7 +206,7 @@ const checkProviderStatus = async (url: string | null, providerName: string): Pr }; export default function DebugTab() { - const { providers } = useSettings(); + const { providers, useLatestBranch } = useSettings(); const [activeProviders, setActiveProviders] = useState([]); const [updateMessage, setUpdateMessage] = useState(''); const [systemInfo] = useState(getSystemInfo()); @@ -212,29 +219,30 @@ export default function DebugTab() { try { const entries = Object.entries(providers) as [string, IProviderConfig][]; - const statuses = entries - .filter(([, provider]) => LOCAL_PROVIDERS.includes(provider.name)) - .map(async ([, provider]) => { - const envVarName = - provider.name.toLowerCase() === 'ollama' - ? 'OLLAMA_API_BASE_URL' - : provider.name.toLowerCase() === 'lmstudio' + const statuses = await Promise.all( + entries + .filter(([, provider]) => LOCAL_PROVIDERS.includes(provider.name)) + .map(async ([, provider]) => { + const envVarName = + provider.name.toLowerCase() === 'ollama' + ? 'OLLAMA_API_BASE_URL' + : provider.name.toLowerCase() === 'lmstudio' ? 'LMSTUDIO_API_BASE_URL' : `REACT_APP_${provider.name.toUpperCase()}_URL`; - // Access environment variables through import.meta.env - const url = import.meta.env[envVarName] || null; - console.log(`[Debug] Using URL for ${provider.name}:`, url, `(from ${envVarName})`); + // Access environment variables through import.meta.env + const url = import.meta.env[envVarName] || provider.settings.baseUrl || null; // Ensure baseUrl is used + console.log(`[Debug] Using URL for ${provider.name}:`, url, `(from ${envVarName})`); - const status = await checkProviderStatus(url, provider.name); + const status = await checkProviderStatus(url, provider.name); + return { + ...status, + enabled: provider.settings.enabled ?? false, + }; + }) + ); - return { - ...status, - enabled: provider.settings.enabled ?? false, - }; - }); - - Promise.all(statuses).then(setActiveProviders); + setActiveProviders(statuses); } catch (error) { console.error('[Debug] Failed to update provider statuses:', error); } @@ -257,32 +265,26 @@ export default function DebugTab() { setIsCheckingUpdate(true); setUpdateMessage('Checking for updates...'); - const [originalResponse, forkResponse] = await Promise.all([ - fetch(GITHUB_URLS.original), - fetch(GITHUB_URLS.fork), - ]); + const branchToCheck = useLatestBranch ? 'main' : 'stable'; + console.log(`[Debug] Checking for updates against ${branchToCheck} branch`); - if (!originalResponse.ok || !forkResponse.ok) { - throw new Error('Failed to fetch repository information'); + const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck)); + if (!localCommitResponse.ok) { + throw new Error('Failed to fetch local commit info'); } - const [originalData, forkData] = await Promise.all([ - originalResponse.json() as Promise<{ sha: string }>, - forkResponse.json() as Promise<{ sha: string }>, - ]); + const localCommitData = await localCommitResponse.json() as CommitData; + const remoteCommitHash = localCommitData.commit; + const currentCommitHash = versionHash; - const originalCommitHash = originalData.sha; - const forkCommitHash = forkData.sha; - const isForked = versionHash === forkCommitHash && forkCommitHash !== originalCommitHash; - - if (originalCommitHash !== versionHash) { + if (remoteCommitHash !== currentCommitHash) { setUpdateMessage( - `Update available from original repository!\n` + - `Current: ${versionHash.slice(0, 7)}${isForked ? ' (forked)' : ''}\n` + - `Latest: ${originalCommitHash.slice(0, 7)}`, + `Update available from ${branchToCheck} branch!\n` + + `Current: ${currentCommitHash.slice(0, 7)}\n` + + `Latest: ${remoteCommitHash.slice(0, 7)}` ); } else { - setUpdateMessage('You are on the latest version from the original repository'); + setUpdateMessage(`You are on the latest version from the ${branchToCheck} branch`); } } catch (error) { setUpdateMessage('Failed to check for updates'); @@ -290,7 +292,7 @@ export default function DebugTab() { } finally { setIsCheckingUpdate(false); } - }, [isCheckingUpdate]); + }, [isCheckingUpdate, useLatestBranch]); const handleCopyToClipboard = useCallback(() => { const debugInfo = { @@ -305,13 +307,17 @@ export default function DebugTab() { responseTime: provider.responseTime, url: provider.url, })), - Version: versionHash, + Version: { + hash: versionHash.slice(0, 7), + branch: useLatestBranch ? 'main' : 'stable' + }, Timestamp: new Date().toISOString(), }; + navigator.clipboard.writeText(JSON.stringify(debugInfo, null, 2)).then(() => { - alert('Debug information copied to clipboard!'); + toast.success('Debug information copied to clipboard!'); }); - }, [activeProviders, systemInfo]); + }, [activeProviders, systemInfo, useLatestBranch]); return (
diff --git a/app/components/settings/features/FeaturesTab.tsx b/app/components/settings/features/FeaturesTab.tsx index 9c9e4a0..c0b33ad 100644 --- a/app/components/settings/features/FeaturesTab.tsx +++ b/app/components/settings/features/FeaturesTab.tsx @@ -3,18 +3,29 @@ import { Switch } from '~/components/ui/Switch'; import { useSettings } from '~/lib/hooks/useSettings'; export default function FeaturesTab() { - const { debug, enableDebugMode, isLocalModel, enableLocalModels, eventLogs, enableEventLogs } = useSettings(); + const { debug, enableDebugMode, isLocalModel, enableLocalModels, eventLogs, enableEventLogs, useLatestBranch, enableLatestBranch } = useSettings(); + + const handleToggle = (enabled: boolean) => { + enableDebugMode(enabled); + enableEventLogs(enabled); + }; + return (

Optional Features

-
- Debug Info - -
-
- Event Logs - +
+
+ Debug Features + +
+
+
+ Use Main Branch +

Check for updates against the main branch instead of stable

+
+ +
@@ -24,7 +35,7 @@ export default function FeaturesTab() { Disclaimer: Experimental features may be unstable and are subject to change.

- Enable Local Models + Experimental Providers
diff --git a/app/components/settings/providers/ProvidersTab.tsx b/app/components/settings/providers/ProvidersTab.tsx index 0efbc66..926a3c8 100644 --- a/app/components/settings/providers/ProvidersTab.tsx +++ b/app/components/settings/providers/ProvidersTab.tsx @@ -5,6 +5,9 @@ import { LOCAL_PROVIDERS, URL_CONFIGURABLE_PROVIDERS } from '~/lib/stores/settin import type { IProviderConfig } from '~/types/model'; import { logStore } from '~/lib/stores/logs'; +// Import a default fallback icon +import DefaultIcon from '/icons/Default.svg'; // Adjust the path as necessary + export default function ProvidersTab() { const { providers, updateProviderSettings, isLocalModel } = useSettings(); const [filteredProviders, setFilteredProviders] = useState([]); @@ -51,7 +54,14 @@ export default function ProvidersTab() { >
- {`${provider.name} + { // Fallback to default icon on error + e.currentTarget.src = DefaultIcon; + }} + alt={`${provider.name} icon`} + className="w-6 h-6 dark:invert" + /> {provider.name}
{ + try { + navigator.clipboard.writeText(fileOrFolder.fullPath); + } catch (error) { + logger.error(error); + } + }; + + const onCopyRelativePath = (fileOrFolder: FileNode | FolderNode) => { + try { + navigator.clipboard.writeText(fileOrFolder.fullPath.substring((rootFolder || '').length)); + } catch (error) { + logger.error(error); + } + }; + return (
{filteredFileList.map((fileOrFolder) => { @@ -121,6 +138,12 @@ export const FileTree = memo( selected={selectedFile === fileOrFolder.fullPath} file={fileOrFolder} unsavedChanges={unsavedFiles?.has(fileOrFolder.fullPath)} + onCopyPath={() => { + onCopyPath(fileOrFolder); + }} + onCopyRelativePath={() => { + onCopyRelativePath(fileOrFolder); + }} onClick={() => { onFileSelect?.(fileOrFolder.fullPath); }} @@ -134,6 +157,12 @@ export const FileTree = memo( folder={fileOrFolder} selected={allowFolderSelection && selectedFile === fileOrFolder.fullPath} collapsed={collapsedFolders.has(fileOrFolder.fullPath)} + onCopyPath={() => { + onCopyPath(fileOrFolder); + }} + onCopyRelativePath={() => { + onCopyRelativePath(fileOrFolder); + }} onClick={() => { toggleCollapseState(fileOrFolder.fullPath); }} @@ -156,26 +185,67 @@ interface FolderProps { folder: FolderNode; collapsed: boolean; selected?: boolean; + onCopyPath: () => void; + onCopyRelativePath: () => void; onClick: () => void; } -function Folder({ folder: { depth, name }, collapsed, selected = false, onClick }: FolderProps) { +interface FolderContextMenuProps { + onCopyPath?: () => void; + onCopyRelativePath?: () => void; + children: ReactNode; +} + +function ContextMenuItem({ onSelect, children }: { onSelect?: () => void; children: ReactNode }) { return ( - - {name} - + + {children} + + ); +} + +function FileContextMenu({ onCopyPath, onCopyRelativePath, children }: FolderContextMenuProps) { + return ( + + {children} + + + + Copy path + Copy relative path + + + + + ); +} + +function Folder({ folder, collapsed, selected = false, onCopyPath, onCopyRelativePath, onClick }: FolderProps) { + return ( + + + {folder.name} + + ); } @@ -183,31 +253,43 @@ interface FileProps { file: FileNode; selected: boolean; unsavedChanges?: boolean; + onCopyPath: () => void; + onCopyRelativePath: () => void; onClick: () => void; } -function File({ file: { depth, name }, onClick, selected, unsavedChanges = false }: FileProps) { +function File({ + file: { depth, name }, + onClick, + onCopyPath, + onCopyRelativePath, + selected, + unsavedChanges = false, +}: FileProps) { return ( - -
+ -
{name}
- {unsavedChanges && } -
-
+
+
{name}
+ {unsavedChanges && } +
+ + ); } diff --git a/app/lib/.server/llm/api-key.ts b/app/lib/.server/llm/api-key.ts index 30cf2cd..e82d08e 100644 --- a/app/lib/.server/llm/api-key.ts +++ b/app/lib/.server/llm/api-key.ts @@ -39,6 +39,8 @@ export function getAPIKey(cloudflareEnv: Env, provider: string, userApiKeys?: Re return env.TOGETHER_API_KEY || cloudflareEnv.TOGETHER_API_KEY; case 'xAI': return env.XAI_API_KEY || cloudflareEnv.XAI_API_KEY; + case 'Perplexity': + return env.PERPLEXITY_API_KEY || cloudflareEnv.PERPLEXITY_API_KEY; case 'Cohere': return env.COHERE_API_KEY; case 'AzureOpenAI': diff --git a/app/lib/.server/llm/model.ts b/app/lib/.server/llm/model.ts index 2588c2b..1a5aab7 100644 --- a/app/lib/.server/llm/model.ts +++ b/app/lib/.server/llm/model.ts @@ -128,6 +128,15 @@ export function getXAIModel(apiKey: OptionalApiKey, model: string) { return openai(model); } +export function getPerplexityModel(apiKey: OptionalApiKey, model: string) { + const perplexity = createOpenAI({ + baseURL: 'https://api.perplexity.ai/', + apiKey, + }); + + return perplexity(model); +} + export function getModel( provider: string, model: string, @@ -170,6 +179,8 @@ export function getModel( return getXAIModel(apiKey, model); case 'Cohere': return getCohereAIModel(apiKey, model); + case 'Perplexity': + return getPerplexityModel(apiKey, model); default: return getOllamaModel(baseURL, model); } diff --git a/app/lib/hooks/useSettings.tsx b/app/lib/hooks/useSettings.tsx index 0e79651..0a7d65e 100644 --- a/app/lib/hooks/useSettings.tsx +++ b/app/lib/hooks/useSettings.tsx @@ -5,19 +5,42 @@ import { isLocalModelsEnabled, LOCAL_PROVIDERS, providersStore, + latestBranch, } from '~/lib/stores/settings'; import { useCallback, useEffect, useState } from 'react'; import Cookies from 'js-cookie'; import type { IProviderSetting, ProviderInfo } from '~/types/model'; import { logStore } from '~/lib/stores/logs'; // assuming logStore is imported from this location +import commit from '~/commit.json'; + +interface CommitData { + commit: string; +} export function useSettings() { const providers = useStore(providersStore); const debug = useStore(isDebugMode); const eventLogs = useStore(isEventLogsEnabled); const isLocalModel = useStore(isLocalModelsEnabled); + const useLatest = useStore(latestBranch); const [activeProviders, setActiveProviders] = useState([]); + // Function to check if we're on stable version + const checkIsStableVersion = async () => { + try { + const stableResponse = await fetch('https://raw.githubusercontent.com/stackblitz-labs/bolt.diy/stable/app/commit.json'); + if (!stableResponse.ok) { + console.warn('Failed to fetch stable commit info'); + return false; + } + const stableData = await stableResponse.json() as CommitData; + return commit.commit === stableData.commit; + } catch (error) { + console.warn('Error checking stable version:', error); + return false; + } + }; + // reading values from cookies on mount useEffect(() => { const savedProviders = Cookies.get('providers'); @@ -60,6 +83,19 @@ export function useSettings() { if (savedLocalModels) { isLocalModelsEnabled.set(savedLocalModels === 'true'); } + + // load latest branch setting from cookies or determine based on version + const savedLatestBranch = Cookies.get('useLatestBranch'); + if (savedLatestBranch === undefined) { + // If setting hasn't been set by user, check version + checkIsStableVersion().then(isStable => { + const shouldUseLatest = !isStable; + latestBranch.set(shouldUseLatest); + Cookies.set('useLatestBranch', String(shouldUseLatest)); + }); + } else { + latestBranch.set(savedLatestBranch === 'true'); + } }, []); // writing values to cookies on change @@ -111,6 +147,12 @@ export function useSettings() { Cookies.set('isLocalModelsEnabled', String(enabled)); }, []); + const enableLatestBranch = useCallback((enabled: boolean) => { + latestBranch.set(enabled); + logStore.logSystem(`Main branch updates ${enabled ? 'enabled' : 'disabled'}`); + Cookies.set('useLatestBranch', String(enabled)); + }, []); + return { providers, activeProviders, @@ -121,5 +163,7 @@ export function useSettings() { enableEventLogs, isLocalModel, enableLocalModels, + useLatestBranch: useLatest, + enableLatestBranch, }; } diff --git a/app/lib/stores/settings.ts b/app/lib/stores/settings.ts index abbb825..2e410a6 100644 --- a/app/lib/stores/settings.ts +++ b/app/lib/stores/settings.ts @@ -46,3 +46,5 @@ export const isDebugMode = atom(false); export const isEventLogsEnabled = atom(false); export const isLocalModelsEnabled = atom(true); + +export const latestBranch = atom(false); diff --git a/app/utils/constants.ts b/app/utils/constants.ts index 2ab6cfb..5531c4b 100644 --- a/app/utils/constants.ts +++ b/app/utils/constants.ts @@ -294,6 +294,30 @@ const PROVIDER_LIST: ProviderInfo[] = [ ], getApiKeyLink: 'https://api.together.xyz/settings/api-keys', }, + { + name: 'Perplexity', + staticModels: [ + { + name: 'llama-3.1-sonar-small-128k-online', + label: 'Sonar Small Online', + provider: 'Perplexity', + maxTokenAllowed: 8192, + }, + { + name: 'llama-3.1-sonar-large-128k-online', + label: 'Sonar Large Online', + provider: 'Perplexity', + maxTokenAllowed: 8192, + }, + { + name: 'llama-3.1-sonar-huge-128k-online', + label: 'Sonar Huge Online', + provider: 'Perplexity', + maxTokenAllowed: 8192, + }, + ], + getApiKeyLink: 'https://www.perplexity.ai/settings/api', + }, ]; export const DEFAULT_PROVIDER = PROVIDER_LIST[0]; @@ -476,8 +500,6 @@ async function getLMStudioModels(_apiKeys?: Record, settings?: I })); } catch (e: any) { logStore.logError('Failed to get LMStudio models', e, { baseUrl: settings?.baseUrl }); - logger.warn('Failed to get LMStudio models: ', e.message || ''); - return []; } } diff --git a/docs/docs/CONTRIBUTING.md b/docs/docs/CONTRIBUTING.md index b1232f9..7b18010 100644 --- a/docs/docs/CONTRIBUTING.md +++ b/docs/docs/CONTRIBUTING.md @@ -1,11 +1,5 @@ # Contribution Guidelines -## DEFAULT_NUM_CTX - -The `DEFAULT_NUM_CTX` environment variable can be used to limit the maximum number of context values used by the qwen2.5-coder model. For example, to limit the context to 24576 values (which uses 32GB of VRAM), set `DEFAULT_NUM_CTX=24576` in your `.env.local` file. - -First off, thank you for considering contributing to Bolt.diy! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make Bolt.diy a better tool for developers worldwide. - ## 📋 Table of Contents - [Code of Conduct](#code-of-conduct) - [How Can I Contribute?](#how-can-i-contribute) @@ -14,10 +8,14 @@ First off, thank you for considering contributing to Bolt.diy! This fork aims to - [Development Setup](#development-setup) - [Deploymnt with Docker](#docker-deployment-documentation) +--- + ## Code of Conduct This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers. +--- + ## How Can I Contribute? ### 🐞 Reporting Bugs and Feature Requests @@ -35,6 +33,8 @@ This project and everyone participating in it is governed by our Code of Conduct ### ✨ Becoming a Core Contributor We're looking for dedicated contributors to help maintain and grow this project. If you're interested in becoming a core contributor, please fill out our [Contributor Application Form](https://forms.gle/TBSteXSDCtBDwr5m7). +--- + ## Pull Request Guidelines ### 📝 PR Checklist @@ -49,6 +49,8 @@ We're looking for dedicated contributors to help maintain and grow this project. 3. Address all review comments 4. Maintain clean commit history +--- + ## Coding Standards ### 💻 General Guidelines @@ -57,6 +59,8 @@ We're looking for dedicated contributors to help maintain and grow this project. - Keep functions focused and small - Use meaningful variable names +--- + ## Development Setup ### 🔄 Initial Setup @@ -106,6 +110,8 @@ pnpm run dev **Note**: You will need Google Chrome Canary to run this locally if you use Chrome! It's an easy install and a good browser for web development anyway. +--- + ## Testing Run the test suite with: @@ -114,6 +120,8 @@ Run the test suite with: pnpm test ``` +--- + ## Deployment To deploy the application to Cloudflare Pages: @@ -124,6 +132,8 @@ pnpm run deploy Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account. +--- + # Docker Deployment Documentation This guide outlines various methods for building and deploying the application using Docker. @@ -166,6 +176,8 @@ docker-compose --profile development up docker-compose --profile production up ``` +--- + ## Running the Application After building using any of the methods above, run the container with: @@ -178,6 +190,8 @@ docker run -p 5173:5173 --env-file .env.local bolt-ai:development docker run -p 5173:5173 --env-file .env.local bolt-ai:production ``` +--- + ## Deployment with Coolify [Coolify](https://github.com/coollabsio/coolify) provides a straightforward deployment process: @@ -195,6 +209,8 @@ docker run -p 5173:5173 --env-file .env.local bolt-ai:production - Adjust other environment variables as needed 7. Deploy the application +--- + ## VS Code Integration The `docker-compose.yaml` configuration is compatible with VS Code dev containers: @@ -203,6 +219,8 @@ The `docker-compose.yaml` configuration is compatible with VS Code dev container 2. Select the dev container configuration 3. Choose the "development" profile from the context menu +--- + ## Environment Files Ensure you have the appropriate `.env.local` file configured before running the containers. This file should contain: @@ -210,6 +228,16 @@ Ensure you have the appropriate `.env.local` file configured before running the - Environment-specific configurations - Other required environment variables +--- + +## DEFAULT_NUM_CTX + +The `DEFAULT_NUM_CTX` environment variable can be used to limit the maximum number of context values used by the qwen2.5-coder model. For example, to limit the context to 24576 values (which uses 32GB of VRAM), set `DEFAULT_NUM_CTX=24576` in your `.env.local` file. + +First off, thank you for considering contributing to bolt.diy! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make bolt.diy a better tool for developers worldwide. + +--- + ## Notes - Port 5173 is exposed and mapped for both development and production environments diff --git a/docs/docs/FAQ.md b/docs/docs/FAQ.md index 0c339c6..de1b4b1 100644 --- a/docs/docs/FAQ.md +++ b/docs/docs/FAQ.md @@ -1,15 +1,15 @@ # Frequently Asked Questions (FAQ) -## How do I get the best results with Bolt.diy? +## How do I get the best results with bolt.diy? - **Be specific about your stack**: - Mention the frameworks or libraries you want to use (e.g., Astro, Tailwind, ShadCN) in your initial prompt. This ensures that Bolt.diy scaffolds the project according to your preferences. + Mention the frameworks or libraries you want to use (e.g., Astro, Tailwind, ShadCN) in your initial prompt. This ensures that bolt.diy scaffolds the project according to your preferences. - **Use the enhance prompt icon**: Before sending your prompt, click the *enhance* icon to let the AI refine your prompt. You can edit the suggested improvements before submitting. - **Scaffold the basics first, then add features**: - Ensure the foundational structure of your application is in place before introducing advanced functionality. This helps Bolt.diy establish a solid base to build on. + Ensure the foundational structure of your application is in place before introducing advanced functionality. This helps bolt.diy establish a solid base to build on. - **Batch simple instructions**: Combine simple tasks into a single prompt to save time and reduce API credit consumption. For example: @@ -17,14 +17,13 @@ --- -## How do I contribute to Bolt.diy? +## How do I contribute to bolt.diy? Check out our [Contribution Guide](CONTRIBUTING.md) for more details on how to get involved! --- - -## What are the future plans for Bolt.diy? +## What are the future plans for bolt.diy? Visit our [Roadmap](https://roadmap.sh/r/ottodev-roadmap-2ovzo) for the latest updates. New features and improvements are on the way! @@ -33,13 +32,13 @@ New features and improvements are on the way! ## Why are there so many open issues/pull requests? -Bolt.diy began as a small showcase project on @ColeMedin's YouTube channel to explore editing open-source projects with local LLMs. However, it quickly grew into a massive community effort! +bolt.diy began as a small showcase project on @ColeMedin's YouTube channel to explore editing open-source projects with local LLMs. However, it quickly grew into a massive community effort! We’re forming a team of maintainers to manage demand and streamline issue resolution. The maintainers are rockstars, and we’re also exploring partnerships to help the project thrive. --- -## How do local LLMs compare to larger models like Claude 3.5 Sonnet for Bolt.diy? +## How do local LLMs compare to larger models like Claude 3.5 Sonnet for bolt.diy? While local LLMs are improving rapidly, larger models like GPT-4o, Claude 3.5 Sonnet, and DeepSeek Coder V2 236b still offer the best results for complex applications. Our ongoing focus is to improve prompts, agents, and the platform to better support smaller local LLMs. @@ -73,4 +72,4 @@ Local LLMs like Qwen-2.5-Coder are powerful for small applications but still exp --- -Got more questions? Feel free to reach out or open an issue in our GitHub repo! \ No newline at end of file +Got more questions? Feel free to reach out or open an issue in our GitHub repo! diff --git a/docs/docs/index.md b/docs/docs/index.md index 8a4d341..389e74f 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,38 +1,46 @@ -# Welcome to Bolt DIY -Bolt.diy 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. +# Welcome to bolt diy +bolt.diy 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. -Join the community! +--- -https://thinktank.ottomator.ai +## Join the community! -## Whats Bolt.diy +[Join the community!](https://thinktank.ottomator.ai) -Bolt.diy 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) +--- -## What Makes Bolt.diy Different +## Whats bolt.diy -Claude, v0, etc are incredible- but you can't install packages, run backends, or edit code. That’s where Bolt.diy stands out: +bolt.diy 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) -- **Full-Stack in the Browser**: Bolt.diy integrates cutting-edge AI models with an in-browser development environment powered by **StackBlitz’s WebContainers**. This allows you to: +--- + +## What Makes bolt.diy Different + +Claude, v0, etc are incredible- but you can't install packages, run backends, or edit code. That’s where bolt.diy stands out: + +- **Full-Stack in the Browser**: bolt.diy integrates cutting-edge AI models with an in-browser development environment powered by **StackBlitz’s WebContainers**. This allows you to: - Install and run npm tools and libraries (like Vite, Next.js, and more) - Run Node.js servers - Interact with third-party APIs - Deploy to production from chat - Share your work via a URL -- **AI with Environment Control**: Unlike traditional dev environments where the AI can only assist in code generation, Bolt.diy gives AI models **complete control** over the entire environment including the filesystem, node server, package manager, terminal, and browser console. This empowers AI agents to handle the whole app lifecycle—from creation to deployment. +- **AI with Environment Control**: Unlike traditional dev environments where the AI can only assist in code generation, bolt.diy gives AI models **complete control** over the entire environment including the filesystem, node server, package manager, terminal, and browser console. This empowers AI agents to handle the whole app lifecycle—from creation to deployment. -Whether you’re an experienced developer, a PM, or a designer, Bolt.diy allows you to easily build production-grade full-stack applications. +Whether you’re an experienced developer, a PM, or a designer, bolt.diy allows you to easily build production-grade full-stack applications. For developers interested in building their own AI-powered development tools with WebContainers, check out the open-source Bolt codebase in this repo! +--- + ## Setup Many of you are new users to installing software from Github. If you have any installation troubles reach out and submit an "issue" using the links above, or feel free to enhance this documentation by forking, editing the instructions, and doing a pull request. -1. Install Git from https://git-scm.com/downloads +1. [Install Git from](https://git-scm.com/downloads) -2. Install Node.js from https://nodejs.org/en/download/ +2. [Install Node.js from](https://nodejs.org/en/download/) Pay attention to the installer notes after completion. @@ -62,11 +70,11 @@ defaults write com.apple.finder AppleShowAllFiles YES **NOTE**: you only have to set the ones you want to use and Ollama doesn't need an API key because it runs locally on your computer: -Get your GROQ API Key here: https://console.groq.com/keys +[Get your GROQ API Key here](https://console.groq.com/keys) -Get your Open AI API Key by following these instructions: https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key +[Get your Open AI API Key by following these instructions](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key) -Get your Anthropic API Key in your account settings: https://console.anthropic.com/settings/keys +Get your Anthropic API Key in your [account settings](https://console.anthropic.com/settings/keys) ``` GROQ_API_KEY=XXX @@ -128,6 +136,8 @@ When you run the Docker Compose command with the development profile, any change make on your machine to the code will automatically be reflected in the site running on the container (i.e. hot reloading still applies!). +--- + ## Run Without Docker 1. Install dependencies using Terminal (or CMD in Windows with admin permissions): @@ -148,14 +158,18 @@ sudo npm install -g pnpm pnpm run dev ``` +--- + ## Adding New LLMs: -To make new LLMs available to use in this version of Bolt.diy, 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. +To make new LLMs available to use in this version of bolt.diy, 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. By default, Anthropic, OpenAI, Groq, and Ollama are implemented as providers, but the YouTube video for this repo covers how to extend this to work with more providers if you wish! When you add a new model to the MODEL_LIST array, it will immediately be available to use when you run the app locally or reload it. For Ollama models, make sure you have the model installed already before trying to use it here! +--- + ## Available Scripts - `pnpm run dev`: Starts the development server. @@ -167,6 +181,8 @@ When you add a new model to the MODEL_LIST array, it will immediately be availab - `pnpm run typegen`: Generates TypeScript types using Wrangler. - `pnpm run deploy`: Builds the project and deploys it to Cloudflare Pages. +--- + ## Development To start the development server: @@ -177,9 +193,11 @@ pnpm run dev This will start the Remix Vite development server. You will need Google Chrome Canary to run this locally if you use Chrome! It's an easy install and a good browser for web development anyway. +--- + ## Tips and Tricks -Here are some tips to get the most out of Bolt.diy: +Here are some tips to get the most out of bolt.diy: - **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 1153f8b..6b693a1 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Bolt.diy Docs +site_name: bolt.diy Docs site_dir: ../site theme: name: material @@ -31,7 +31,7 @@ theme: repo: fontawesome/brands/github # logo: assets/logo.png # favicon: assets/logo.png -repo_name: Bolt.diy +repo_name: bolt.diy repo_url: https://github.com/stackblitz-labs/bolt.diy edit_uri: "" @@ -40,16 +40,16 @@ extra: social: - icon: fontawesome/brands/github link: https://github.com/stackblitz-labs/bolt.diy - name: Bolt.diy + name: bolt.diy - icon: fontawesome/brands/discourse link: https://thinktank.ottomator.ai/ - name: Bolt.diy Discourse + name: bolt.diy Discourse - icon: fontawesome/brands/x-twitter link: https://x.com/bolt_diy - name: Bolt.diy on X + name: bolt.diy on X - icon: fontawesome/brands/bluesky link: https://bsky.app/profile/bolt.diy - name: Bolt.diy on Bluesky + name: bolt.diy on Bluesky diff --git a/package.json b/package.json index fa38416..6b197f8 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "@octokit/rest": "^21.0.2", "@octokit/types": "^13.6.2", "@openrouter/ai-sdk-provider": "^0.0.5", + "@radix-ui/react-context-menu": "^2.2.2", "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-separator": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6fe7db1..efec898 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,6 +95,9 @@ importers: '@openrouter/ai-sdk-provider': specifier: ^0.0.5 version: 0.0.5(zod@3.23.8) + '@radix-ui/react-context-menu': + specifier: ^2.2.2 + version: 2.2.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@radix-ui/react-dialog': specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -1530,6 +1533,19 @@ packages: '@types/react': optional: true + '@radix-ui/react-context-menu@2.2.2': + resolution: {integrity: sha512-99EatSTpW+hRYHt7m8wdDlLtkmTovEe8Z/hnxUPV+SKuuNL5HWNhQI4QSdjZqNSgXHay2z4M3Dym73j9p2Gx5Q==} + peerDependencies: + '@types/react': '*' + '@types/react-dom': '*' + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + '@types/react': + optional: true + '@types/react-dom': + optional: true + '@radix-ui/react-context@1.1.0': resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} peerDependencies: @@ -6888,6 +6904,20 @@ snapshots: optionalDependencies: '@types/react': 18.3.12 + '@radix-ui/react-context-menu@2.2.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + dependencies: + '@radix-ui/primitive': 1.1.0 + '@radix-ui/react-context': 1.1.1(@types/react@18.3.12)(react@18.3.1) + '@radix-ui/react-menu': 2.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.12)(react@18.3.1) + '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.12)(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.12 + '@types/react-dom': 18.3.1 + '@radix-ui/react-context@1.1.0(@types/react@18.3.12)(react@18.3.1)': dependencies: react: 18.3.1 diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..333e9d1 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/icons/Default.svg b/public/icons/Default.svg new file mode 100644 index 0000000..dd63997 --- /dev/null +++ b/public/icons/Default.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/icons/Perplexity.svg b/public/icons/Perplexity.svg new file mode 100644 index 0000000..950b09e --- /dev/null +++ b/public/icons/Perplexity.svg @@ -0,0 +1,4 @@ + + + + diff --git a/vite.config.ts b/vite.config.ts index 0313812..f18b8b9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,7 +19,8 @@ export default defineConfig((config) => { future: { v3_fetcherPersist: true, v3_relativeSplatPath: true, - v3_throwAbortReason: true + v3_throwAbortReason: true, + v3_lazyRouteDiscovery: true }, }), UnoCSS(), diff --git a/worker-configuration.d.ts b/worker-configuration.d.ts index 4eaf210..ed2afca 100644 --- a/worker-configuration.d.ts +++ b/worker-configuration.d.ts @@ -14,4 +14,5 @@ interface Env { GOOGLE_GENERATIVE_AI_API_KEY: string; MISTRAL_API_KEY: string; XAI_API_KEY: string; + PERPLEXITY_API_KEY: string; }