devika icon indicating copy to clipboard operation
devika copied to clipboard

Git functionalities for the Devika

Open Parth-Jain-2002 opened this issue 1 year ago • 16 comments

  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

Parth-Jain-2002 avatar Apr 05 '24 17:04 Parth-Jain-2002

are there any test video ?

Ahmet0691 avatar Apr 05 '24 20:04 Ahmet0691

https://github.com/stitionai/devika/assets/72060359/cac66543-eb70-464a-9118-80328ba38d48

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

Parth-Jain-2002 avatar Apr 05 '24 21:04 Parth-Jain-2002

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

franklinselva avatar Apr 06 '24 04:04 franklinselva

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

Parth-Jain-2002 avatar Apr 06 '24 05:04 Parth-Jain-2002

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

franklinselva avatar Apr 06 '24 05:04 franklinselva

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

Parth-Jain-2002 avatar Apr 06 '24 05:04 Parth-Jain-2002

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.

franklinselva avatar Apr 06 '24 05:04 franklinselva

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

ARajgor avatar Apr 06 '24 08:04 ARajgor

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

javacaliente avatar Apr 06 '24 18:04 javacaliente

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.

franklinselva avatar Apr 07 '24 08:04 franklinselva

@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

Parth-Jain-2002 avatar Apr 11 '24 08:04 Parth-Jain-2002

any update on this?

nalaso avatar Apr 21 '24 14:04 nalaso

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

Parth-Jain-2002 avatar Apr 22 '24 04:04 Parth-Jain-2002

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

darrassi1 avatar Apr 22 '24 10:04 darrassi1

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

Parth-Jain-2002 avatar Apr 24 '24 09:04 Parth-Jain-2002

Integrate git.py and github.py

ARajgor avatar Apr 27 '24 06:04 ARajgor