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

Git functionalities for the Devika #377

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Parth-Jain-2002
Copy link
Contributor

  1. Now, Devika can initialize the repo and commit changes whenever asked by the user.
  2. The commit message is dynamically generated based on the differences from the last commit and user's last message
  3. Also, the functionality to reset code to the last commit has been added

@Ahmet0691
Copy link
Contributor

are there any test video ?

@Parth-Jain-2002
Copy link
Contributor Author

Parth-Jain-2002 commented Apr 5, 2024

recording-2024-04-06-022543.mp4

As observed in the video, Devika is now capable of having

  1. Git versioning system in the project
  2. Able to stage changes and commit them with dynamic commit messages
  3. It also has the ability to reset the changes to the last commit

@franklinselva
Copy link

@Parth-Jain-2002 Nice additions. Can you test this feature without much user input?

@Parth-Jain-2002
Copy link
Contributor Author

Currently have integrated this into actions. So according to user prompt, it checks whether to initialize, commit or reverse change. User input is needed for now.

Suggestion: At the very start, we can ask the user if he wants to switch to automatic versioning. In that case, Devika can commit after it finishes a task without user needing to mention commit

@franklinselva
Copy link

I think that's a good approach to take. I want to add one more thing. On autonomy, when the commit messages can be generated after each step in the plan succeeds

@Parth-Jain-2002
Copy link
Contributor Author

Can you elaborate what did you mean by "On autonomy, when the commit messages can be generated after each step in the plan succeeds"?

@franklinselva
Copy link

Suggestion: At the very start, we can ask the user if he wants to switch to automatic versioning. In that case, Devika can commit after it finishes a task without user needing to mention commit

When the agent is on automatic versioning, the commit messages can be generated based on the steps of the plan. So when ever a task is achieved in the plan. the changes are committed to the git.

@ARajgor
Copy link
Collaborator

ARajgor commented Apr 6, 2024

looking good. but not sure how we can integrate more. let me go through it

@ARajgor ARajgor added the enhancement New feature or request label Apr 6, 2024
@javacaliente
Copy link

funny, i just stumbled upon this when I read your comments.

A CLI that writes your git commit messages for you with AI. Never write a commit message again.
https://github.com/Nutlope/aicommits

@franklinselva
Copy link

That’s a good find. And as a starting point, I would say we can use git-diff and the LLM that’s associated with the agent.

@Parth-Jain-2002
Copy link
Contributor Author

@ARajgor @franklinselva Added the functionality of automatic commit. Now, Devika can commit on its own after each task completion without user prompt. Since, auto_commit property is added into Project modal, you need to refresh the devika.db for it to work properly.

Have tested it properly and attaching some screenshots for the same:
image
image
image

@nalaso
Copy link
Contributor

nalaso commented Apr 21, 2024

any update on this?

@Parth-Jain-2002
Copy link
Contributor Author

It is complete from my end. Can you review this and merge it into the main?

@darrassi1
Copy link
Contributor

$ bun run start
error: Script not found "start"

@Parth-Jain-2002
Copy link
Contributor Author

"bun run dev"
This is the command to run frontend

if self.git == None:
self.git = Git(project_path, self.base_model)

commit_message = self.git.generate_commit_message(project_name, conversation,code_markdown)
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no reference of conversation and code_markdown in execute function

Copy link
Contributor

Choose a reason for hiding this comment

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

can u add both these in execute function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure will add that

Copy link
Contributor

Choose a reason for hiding this comment

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

may i know ur discord username?

@ARajgor
Copy link
Collaborator

ARajgor commented Apr 27, 2024

Integrate git.py and github.py

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.

None yet

7 participants