BuilderIO / micro-agent

An AI agent that writes (actually useful) code for you
https://www.builder.io/blog/micro-agent
MIT License
2.61k stars 206 forks source link

Added Warning message for the invalid project #28

Closed ayush3160 closed 2 months ago

ayush3160 commented 2 months ago

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

steve8708 commented 2 months ago

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

steve8708 commented 2 months ago

Hey Ayush - no need, I went ahead and merged in your PR and added it as I think this is a great addition and wanted to get a release out yesterday including it

On Thu, Jun 13 2024 at 2:38 AM, Ayush Sharma < @.*** > wrote:

@.**** commented on this pull request.

In src/helpers/validate-project.ts ( https://github.com/BuilderIO/micro-agent/pull/28#discussion_r1637907455 ) :

@@ -0,0 +1,24 @@ +import fs from 'fs/promises'; +import path from 'path'; + +export async function isCorrectProject(): Promise {

  • const currentDir = process.cwd();

  • const packageJsonPath = path.join(currentDir, 'package.json');
  • const requirementsTxtPath = path.join(currentDir, 'requirements.txt');

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

— Reply to this email directly, view it on GitHub ( https://github.com/BuilderIO/micro-agent/pull/28#discussion_r1637907455 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAGOEAZYRX4Y345GY2UKRATZHFSARAVCNFSM6AAAAABJFY4PQKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMJVGI4DSNZVGI ). You are receiving this because you modified the open/close state. Message ID: <BuilderIO/micro-agent/pull/28/review/2115289752 @ github. com>