Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload folder to workbench #31

Conversation

cepicdalim
Copy link

@cepicdalim cepicdalim commented Oct 21, 2024

Use Case

Now users are able to upload their local folders to active workbench.

Changes

  • Added new PanelHeaderFileUpload component
  • PanelHeaderFileUpload added to Workbench header section
  • Upload folder actions are added to workbench store

Way of Work

  • Start your project and go to home page
  • Start conversation with simple message (I'm always starting with 'hi' for the sake of humanity :) )
  • Open workbench with the icon on the top right section (incase of initiative prompt doesn't produce any code)
  • Hit the 'Upload Folder' button at the top of the workbench
  • Select your folder that you want to upload
  • And see all the files uploaded, and showing in the file tree of the workbench

Negative Aspects

The AI won't be able to aware of changes. It make sense to give brief of the changes as a message behind the scene. Let's discuss it under an epic.

- Added new PanelHeaderFileUpload component
- PanelHeaderFileUpload added to Workbench header section
- Upload folder actions are added to workbench store
@r3d91ll
Copy link

r3d91ll commented Oct 22, 2024

Hey, so I just tested this on my fork, and it uploads the files but the are not displayed in the workbench...I also get a broken pipe error when I do so:

✘ [ERROR] workerd/server/server.c++:3360: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error

stack:
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584d3a3
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584bb0d
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4086163
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@581ac00
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@582d490
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@582d490
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@582d490
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e009c0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e0acf0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@407616b
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@40757f0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e009c0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3553d00
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3554134
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@33db510
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@387b623
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e0acf0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@407616b
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@40757f0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e009c0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3553d00
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3554134
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580dcb3
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@33dc99f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580f0dc
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580f9f1
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@5815f44

✘ [ERROR] workerd/server/server.c++:3155: error: kj::getCaughtExceptionAsKj() = kj/async-io-unix.c++:186: disconnected: ::write(fd, buffer.begin(), buffer.size()): Broken pipe

stack:
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584af33
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584baa1
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@40312d9
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4031654
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4087086
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@408a7fd
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@408aad4
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@34b51e0
/home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e26c40

I would really like to see this up and running. The biggest downside to Bolt.new is that it doesn't work all that well with existing codebases, so the ability to drop in a zip and have it on the workbench is a start in the right direction.

@cepicdalim
Copy link
Author

Hey, so I just tested this on my fork, and it uploads the files but the are not displayed in the workbench...I also get a broken pipe error when I do so:

✘ [ERROR] workerd/server/server.c++:3360: error: Uncaught exception: kj/async-io-unix.c++:778: disconnected: remote.worker_do_not_log; Request failed due to internal error

stack: /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584d3a3 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584bb0d /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4086163 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@581ac00 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@582d490 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@582d490 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@582d490 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e009c0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e0acf0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@407616b /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@40757f0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e009c0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3553d00 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3554134 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@33db510 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@387b623 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e0acf0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@407616b /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@40757f0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e009c0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3553d00 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@3554134 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580dcb3 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@33dc99f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580f0dc /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580f9f1 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@5815f44

✘ [ERROR] workerd/server/server.c++:3155: error: kj::getCaughtExceptionAsKj() = kj/async-io-unix.c++:186: disconnected: ::write(fd, buffer.begin(), buffer.size()): Broken pipe

stack: /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584af33 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@584baa1 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@40312d9 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4031654 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@580d80f /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@4087086 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@408a7fd /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@408aad4 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@34b51e0 /home/todd/workspace/bolt/bolt.new-any-llm/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e26c40

I would really like to see this up and running. The biggest downside to Bolt.new is that it doesn't work all that well with existing codebases, so the ability to drop in a zip and have it on the workbench is a start in the right direction.

That's sounds interesting because it's working fine on my side.
image

Which browser are you using?
Can you please attach inspector console and some screenshot that could cover the page itself as well?

Thanks in advance.

@r3d91ll
Copy link

r3d91ll commented Oct 23, 2024

so I just tried in Firefox and Chrome both have the same errors. I have attached to console log for your review.

console-export-2024-10-23_10-20-6.txt

image

@r3d91ll
Copy link

r3d91ll commented Oct 23, 2024

something else I have noticed, and this may be out of scope of this issue, when you first start Bolt there is no way to open the workbench until after you have started a conversation, nor is there a way start the conversation off with a file or folder. Probably out of scope for this particular issue but given what you are trying to do I thought I would see what your thoughts were.

@cepicdalim
Copy link
Author

@r3d91ll
As far as I can see the errors aren't clear due to minification.
The flow should be like

  • Run project
  • Start conversation with simple message (I'm always starting with 'hi' for the sake of humanity :) )
  • Open workbench with the icon on the top right section (incase of initiative prompt doesn't produce any code)
  • Hit the 'Upload Folder' button at the top of the workbench
  • Select your folder that you want to upload
  • And see all the files uploaded, and showing in the file tree of the workbench

If you provide your re-production steps for the error, I'll try on my side as well. Thanks in advance.

@coleam00
Copy link
Collaborator

@cepicdalim This is awesome, thank you so much! I'll wait for @r3d91ll to get back with the issues he is running into. Otherwise I can do some testing with this soon before merging into main! I hope to add this in soon!

How hard do you think it would be to make the AI aware of the changes without having to manually describe it in the next prompt? That would make this even better!

@r3d91ll
Copy link

r3d91ll commented Oct 24, 2024

@r3d91ll As far as I can see the errors aren't clear due to minification. The flow should be like

* Run project

* Start conversation with simple message (I'm always starting with 'hi' for the sake of humanity :) )

* Open workbench with the icon on the top right section (incase of initiative prompt doesn't produce any code)

* Hit the 'Upload Folder' button at the top of the workbench

* Select your folder that you want to upload

* And see all the files uploaded, and showing in the file tree of the workbench

If you provide your re-production steps for the error, I'll try on my side as well. Thanks in advance.

I included the log in my last post, however I get it downloading random stuff from unknown persons on the internet gives me the heebeegeebees as well...here is the content of the logs from the screenshots I posted yesterday.
I do follow the same process of starting a conversation and then getting availability of the workbench and then uploading the files. the upload button does appears but when I try to upload a directory of files I get the error messages bellow and nothing shows up in the workbench.

Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Ca http://localhost:8788/assets/components-bNrEeZYQ.js:38
lh http://localhost:8788/assets/components-bNrEeZYQ.js:40
th http://localhost:8788/assets/components-bNrEeZYQ.js:40
Lv http://localhost:8788/assets/components-bNrEeZYQ.js:40
qd http://localhost:8788/assets/components-bNrEeZYQ.js:40
R http://localhost:8788/assets/components-bNrEeZYQ.js:25
ee http://localhost:8788/assets/components-bNrEeZYQ.js:25
components-bNrEeZYQ.js:156:487
Bh http://localhost:8788/assets/components-bNrEeZYQ.js:156
Tu http://localhost:8788/assets/components-bNrEeZYQ.js:38
lh http://localhost:8788/assets/components-bNrEeZYQ.js:40
th http://localhost:8788/assets/components-bNrEeZYQ.js:40
Lv http://localhost:8788/assets/components-bNrEeZYQ.js:40
qd http://localhost:8788/assets/components-bNrEeZYQ.js:40
R http://localhost:8788/assets/components-bNrEeZYQ.js:25
ee http://localhost:8788/assets/components-bNrEeZYQ.js:25
Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Ca http://localhost:8788/assets/components-bNrEeZYQ.js:38
lh http://localhost:8788/assets/components-bNrEeZYQ.js:40
th http://localhost:8788/assets/components-bNrEeZYQ.js:40
Lv http://localhost:8788/assets/components-bNrEeZYQ.js:40
qd http://localhost:8788/assets/components-bNrEeZYQ.js:40
R http://localhost:8788/assets/components-bNrEeZYQ.js:25
ee http://localhost:8788/assets/components-bNrEeZYQ.js:25
components-bNrEeZYQ.js:156:487
Uncaught Error: Minified React error #425; visit https://reactjs.org/docs/error-decoder.html?invariant=425 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Ql http://localhost:8788/assets/components-bNrEeZYQ.js:38
Sv http://localhost:8788/assets/components-bNrEeZYQ.js:40
nh http://localhost:8788/assets/components-bNrEeZYQ.js:40
th http://localhost:8788/assets/components-bNrEeZYQ.js:40
Lv http://localhost:8788/assets/components-bNrEeZYQ.js:40
qd http://localhost:8788/assets/components-bNrEeZYQ.js:40
R http://localhost:8788/assets/components-bNrEeZYQ.js:25
ee http://localhost:8788/assets/components-bNrEeZYQ.js:25
6 components-bNrEeZYQ.js:38:68
Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Ca http://localhost:8788/assets/components-bNrEeZYQ.js:38
lh http://localhost:8788/assets/components-bNrEeZYQ.js:40
th http://localhost:8788/assets/components-bNrEeZYQ.js:40
Lv http://localhost:8788/assets/components-bNrEeZYQ.js:40
qd http://localhost:8788/assets/components-bNrEeZYQ.js:40
R http://localhost:8788/assets/components-bNrEeZYQ.js:25
ee http://localhost:8788/assets/components-bNrEeZYQ.js:25
28 components-bNrEeZYQ.js:38:4924
Uncaught Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
lh http://localhost:8788/assets/components-bNrEeZYQ.js:40
th http://localhost:8788/assets/components-bNrEeZYQ.js:40
Rv http://localhost:8788/assets/components-bNrEeZYQ.js:40
Ho http://localhost:8788/assets/components-bNrEeZYQ.js:40
Ha http://localhost:8788/assets/components-bNrEeZYQ.js:40
qd http://localhost:8788/assets/components-bNrEeZYQ.js:40
R http://localhost:8788/assets/components-bNrEeZYQ.js:25
ee http://localhost:8788/assets/components-bNrEeZYQ.js:25
components-bNrEeZYQ.js:40:45136

if you need something more let me know and Ill do my best to get it posted ASAP.

@r3d91ll
Copy link

r3d91ll commented Oct 24, 2024

@cepicdalim This is awesome, thank you so much! I'll wait for @r3d91ll to get back with the issues he is running into. Otherwise I can do some testing with this soon before merging into main! I hope to add this in soon!

How hard do you think it would be to make the AI aware of the changes without having to manually describe it in the next prompt? That would make this even better!

that is the million dollar question right there...to my thinking we will need more than just some prompt engineering on the backend. I think we will find that there are a limited number of vanilla models out there that will have the necessary fine-tune training to use this framework effectively. I suspect it will take a model fine-tuned on this framework to use it effectively. However if we can find a model that works say 60% of the time then we should be able to generate enough training data to effectively fine-tune train a model.

@cepicdalim
Copy link
Author

@coleam00 I think you already merged another approach. So maybe we should close this one. #30

@r3d91ll
I think it's hydration issue, maybe the content of your folder cause the issue, maybe trying with single file folder can gives us an idea about root cause. Thanks.

@VersaceXcodes
Copy link

@coleam00 I think you already merged another approach. So maybe we should close this one. #30

@r3d91ll I think it's hydration issue, maybe the content of your folder cause the issue, maybe trying with single file folder can gives us an idea about root cause. Thanks.

what do you mean by hydration issue?

@cepicdalim
Copy link
Author

cepicdalim commented Oct 28, 2024

@r3d91ll I think it's hydration issue, maybe the content of your folder cause the issue, maybe trying with single file folder can gives us an idea about root cause. Thanks.

what do you mean by hydration issue?
@VersaceXcodes
It's means difference between server&client render outputs differs from each other. I'm totally not sure why it's happening at this point, maybe due to some file that @r3d91ll trying to upload. I'll add more exception handling while resolving conflict, so we can take another try, and maybe can find the real issue behind the scene.

https://react.dev/errors/418?invariant=418

…-support

# Conflicts:
#	app/lib/stores/workbench.ts
@cepicdalim cepicdalim changed the title Upload Folder to Workbench feat:Upload Folder to Workbench Oct 28, 2024
@cepicdalim cepicdalim changed the title feat:Upload Folder to Workbench feat: upload folder to workbench Oct 28, 2024
@cepicdalim
Copy link
Author

@r3d91ll, @coleam00
Hi, can you please retry it again after fix commit. As I guessed, it was about SSR hydration issue, and I hope I fixed it 👍 . Thanks in advance.

And the errors in your console not really related with this PR, I tried in master and got the same error as you got.
Here it's the un-minified version of the errors in console.
image

For reproduction

  • Just start server after fresh build (pnpm run build and then pnpm run start)
  • Observer console

@Mrtlearns
Copy link

Hi. can you tell me how to (brand new to git) get this branch....I have followed the instructions for the main anyllm only. But this is a feature I need badly.

@cepicdalim
Copy link
Author

cepicdalim commented Nov 8, 2024

Hi. can you tell me how to (brand new to git) get this branch....I have followed the instructions for the main anyllm only. But this is a feature I need badly.

This is not a branch but a pull request from other fork. So you can check out the fork that contains this particular feature from
https://github.com/cepicdalim/bolt.new-any-llm/tree/feature/upload-folder-support

@Mrtlearns
Copy link

Thank you. Can you give me the command I can type at the bash command prompt that will make me have this feature?
Also I saw the YT video for coleam00 .... what is the link for the community?

@jindalAnuj
Copy link

@cepicdalim Thanks for the awesome feature addition. When tried base folder is uploaded in a nested directory. And ai is writing in root path.

image

Due to nested structure , ai is writing a new file at base folder

@lukinhanw
Copy link

No mine doesn't have that option

@wonderwhy-er
Copy link
Collaborator

Thank you. Can you give me the command I can type at the bash command prompt that will make me have this feature? Also I saw the YT video for coleam00 .... what is the link for the community?

https://thinktank.ottomator.ai/

@wonderwhy-er
Copy link
Collaborator

Sorry for no reviews, I want to get to this, may be today

@lassecapel lassecapel mentioned this pull request Nov 15, 2024
@wonderwhy-er
Copy link
Collaborator

Ok, got to review. I think this needs to be done differently a bit.
It should be done trough Chat.client.tsx
And simulate how AI adds files to the chat.

There is useChat that connects and manages messages from AI

When they change this code is run.
useEffect(() => {
parseMessages(messages, isLoading);

if (messages.length > initialMessages.length) {
  storeMessageHistory(messages).catch((error) => toast.error(error.message));
}

}, [messages, isLoading, parseMessages]);

It calls parseMessages + stores them in history.

And chat also renders them.

My proposal is to use that.

When user uploads files we create new message probably use setMessages method from useChat
It should trigger everything else.

AI will be aware, UI will update, WebContainer too, all things will trigger and so on.

Copy link

github-actions bot commented Dec 2, 2024

This pull request has been marked as stale due to inactivity. If no further activity occurs, it will be closed in 7 days.

@github-actions github-actions bot added the stale The pull / issue is stale and will be closed soon label Dec 2, 2024
@dustinwloring1988 dustinwloring1988 added the enhancement New feature or request label Dec 2, 2024
@github-actions github-actions bot removed the stale The pull / issue is stale and will be closed soon label Dec 2, 2024
@wonderwhy-er
Copy link
Collaborator

AS folder import was merged closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants