-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
(Ready for Review) Start chat with Folder Import #413
Conversation
importChat?: (description: string, messages: Message[]) => Promise<void>; | ||
} | ||
|
||
const IGNORED_FOLDERS = ['node_modules', '.git', 'dist', 'build', '.next', 'coverage', '.cache', '.vscode', '.idea']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to include ignore
try {
// try to read .gitignore if it exists
const gitignoreHandle = await sourceHandle.getFileHandle('.gitignore');
const file = await gitignoreHandle.getFile();
gitignoreContent = await file.text();
ig = ignore().add(gitignoreContent);
} catch (error) {
// .gitignore doesn't exist, use default ignores
ig = ignore().add([
'node_modules',
'.git',
'dist',
'build',
'.cache',
'*.log',
'.DS_Store'
]);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, thanks, will add that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed support for it along with ignoring of binnary files.
I have idea of what to do with binary files but now now. In another PR
# Conflicts: # app/components/chat/BaseChat.tsx
Is this something we're going to merge soon? I have a couple projects I'd love to import |
Yeah, avaiting review and testing from others. |
What about limits? What happens if – just as an example – you load the projects codebase into it? (Asking for a friend 😬) Quite sure we're going to see maaaany PRy once this is possible, so maybe get quality assurance in place soon 🔜 |
By limits you mean how much one can load in to context or chat? And yes, playwright/tests too. And we already have 50 open PRs :D |
@wonderwhy-er This PR is fantastic - looks awesome and I love how clean your implementation is! I tested it out myself and it's working perfectly! I just have a few suggestions, but honestly I would be good with you merging and improving through another PR if you want just because this feature is so sought after:
Nice work man!! |
I agree that we should merge and build on top.
Yes, was thinking about it. One challange is that commands are in package.json and they are non standart. I will add some handling in separate PR
Bolt.new is not optimized for such large projects yet |
This is proof of concept for folder import
It allows to start a new chat with selecting a folder
First message in the chat will be message similar to one AI returns with file content to create project from
Still needs to be tested + other things to do
Video:
2024-11-25.10-23-19.mp4