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

Added Warning message for the invalid project #28

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

ayush3160
Copy link
Contributor

This pull request introduces functionality to warn/or assist to setup a new project if a user is not already in a folder that is clearly a project.

Linked Issue

fixes #24

export async function isCorrectProject(): Promise<boolean> {
const currentDir = process.cwd();
const packageJsonPath = path.join(currentDir, 'package.json');
const requirementsTxtPath = path.join(currentDir, 'requirements.txt');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally lets check for if there is a package.json or requirements.txt in any parent directory too, since i may be in some nested directory but that still would be valid

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added a findPackageJson function that should be useful here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback , I will look into the implementation of findPackageJson function.

@steve8708
Copy link
Contributor

going to merge this in and work off of it and address the feedback I posted here, thanks @ayush3160 !

@steve8708 steve8708 merged commit f0af3fa into BuilderIO:main Jun 12, 2024
2 checks passed
@steve8708
Copy link
Contributor

steve8708 commented Jun 13, 2024 via email

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

Successfully merging this pull request may close these issues.

Handle micro-agent being run without a project with testing setup
2 participants