Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "trobz-agent"
version = "1.0.1"
version = "1.0.2"
description = "Run an AI agent"
authors = [{name = "Hai Lang", email = "[email protected]"}]
requires-python = ">=3.10"
Expand Down
6 changes: 6 additions & 0 deletions tests/test_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import unittest


class TestMethods(unittest.TestCase):
def test_dummy(self):
self.assertEqual(1, 1)
11 changes: 10 additions & 1 deletion trobz_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,20 @@ def commit_if_change(cwd, step):
changes = run_read(cwd, "git", "status", "--short")
if not changes.strip():
return
changed = False
for line in changes.split("\n"):
line = line[3:].strip()
if not line or line.startswith(".."):
continue
changed = True
break
if not changed:
return
run(cwd, "git", "add", ".")
message = step["commit_if_change"]
if message == True: # noqa: E712
message = step["name"]
run(cwd, "git", "commit", "-m", message)
run(cwd, "git", "commit", "--no-verify", "-m", message)


def run_workflow(workflow_dir, workflow, backend, mode, model): # noqa: C901
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.