The way I understand bolt.new/diy is that the bolt system reads the whole available project files (note: different directories of the project files can be set to ignore) and the special bolt prompts to fill up Claude’s 200k context window.
So with each prompt to Bolt, bolt is programmed to send that whole project files and its special instructions bundle (upto 200k context length for Claude, which is what bolt.new uses).
So we all expect the project files to be fed thru bolt to the AI. That apparently isn’t happening with bolt.diy according to my testing via:
Straightforward clone of the bolt.diy master branch and running the App via VS Code
Clone of the bolt.diy main branch and deployment via Cloudflare.
I tested both deployments with a direct-to-Anthropic API Key and an OpenRouter Key.
Without this feature the AI won’t be aware of all of the project files’ critical systems and internal APIs.
It is possible there is a problem on my end causing bolt.diy to glitch this way.
You can test whether the AI is able to read the project files in the following way:
Start a new Chat,
Create a project with files via AI,
Ask bolt.diy to read a certain file’s contents → It will succeed or tell you it cannot read project files,
Now manually change the contents of a project file and Save it,
Ask bolt.diy to read the file’s contents → It will give you the original version of the file’s contents or tell you it can’t read project files.
Right now there is no way to make more sophisticated apps, widgets that hook into an app’s audio and UI engine, etc, so long as bolt.diy isn’t feeding the project context to the AI coding assistant. Because the AI can’t read the project files & instructions residing in the project files for integrating the project’s systems.
All I can say is that chat is sent to AI, and chat contains files.
So when you import from github or folder first chat message contains all files.
They are then put in to webcontainer you see in preview and editor on the right.
When you ask AI for changes it sends chat with files and gets from AI actions of which files to change and how.
From what you described @traflagar I am not sure what you tested and how to come to your conclusions.
discussed this already with @thecodacus in other topics. at the moment manual changes are not working within bolt. Thats a part what you describe. As I see/testet it, the rest should work as @wonderwhy.er said.
As workaround for manual inserting, you can just sync everything out to your host, do the changes, and start a new chat with importing the folder again.
@traflagar , what you are saying is partially true, currently its able to read the project context through the chat history. even for imported folders and git projects, it actually gets placed to the file system through chat history. so it does get the project context. (chat history is also fed to the llm during query)
but if any changes are done manually by the developer directly using the editor then that change is currently not captured. it can be captured but the problem comes at reconstruction on reload. since on project reload the files get recreated by running the chat history. if the changes are not in the chat history it wont be reloaded.
about putting the latest files into the system prompt. there was a PR merged earlier for this #578) then it was commented out cuz some smaller LLMs were started showing some unexpected behaviors. and there was no settings window to toggle that on/off
I have add a new PR #904 to re-enable that feature with a setting option to toggle that on or off. This will help you and the community experiment with this new context optimization while still having an option to have an option to choose the regular way of supplying file context to llm
Hi Codacus. This feature is very important imo. I explained why in this post, note the importance of the ignore config file and I mentioned some other things you may find interesting. I posted to support your git PR.