From c61d1d0bc5c300b4afbc05856cbbb0e5a0f07405 Mon Sep 17 00:00:00 2001 From: Sandro Rodrigues Date: Fri, 10 Jan 2025 23:29:05 +0000 Subject: [PATCH] Bumped version to v0.1.0-alpha.19 (#194) * Bumped version to v0.1.0-alpha.19 * Updated version on uv.lock. --- CHANGELOG.md | 9 ++++++++- daiv/automation/agents/prebuilt.py | 3 +++ daiv/daiv/__init__.py | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27dd095..2069634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [0.1.0-alpha.19] - 2025-01-10 + +### Fixed + +- `prepare_repository_files_as_messages` was returning messages with empty tool calls when no files were found, leading to errors on the agents. + ## [0.1.0-alpha.18] - 2025-01-10 ### Fixed @@ -335,7 +341,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release of the `daiv` project. -[Unreleased]: https://github.com/srtab/daiv/compare/v0.1.0-alpha.18...HEAD +[Unreleased]: https://github.com/srtab/daiv/compare/v0.1.0-alpha.19...HEAD +[0.1.0-alpha.19]: https://github.com/srtab/daiv/compare/v0.1.0-alpha.18...v0.1.0-alpha.19 [0.1.0-alpha.18]: https://github.com/srtab/daiv/compare/v0.1.0-alpha.17...v0.1.0-alpha.18 [0.1.0-alpha.17]: https://github.com/srtab/daiv/compare/v0.1.0-alpha.16...v0.1.0-alpha.17 [0.1.0-alpha.16]: https://github.com/srtab/daiv/compare/v0.1.0-alpha.15...v0.1.0-alpha.16 diff --git a/daiv/automation/agents/prebuilt.py b/daiv/automation/agents/prebuilt.py index f678416..1d32674 100644 --- a/daiv/automation/agents/prebuilt.py +++ b/daiv/automation/agents/prebuilt.py @@ -229,6 +229,9 @@ def prepare_repository_files_as_messages( ) tool_call_messages.append(ToolMessage(content=repository_file_content, tool_call_id=tool_call_id)) + if not tool_calls: + return [] + return [ AIMessage( content=textwrap.dedent( diff --git a/daiv/daiv/__init__.py b/daiv/daiv/__init__.py index a9f5762..5c0f077 100644 --- a/daiv/daiv/__init__.py +++ b/daiv/daiv/__init__.py @@ -2,6 +2,6 @@ # Django starts so that shared_task will use this app. from .celeryapp import app as celery_app -__version__ = "0.1.0-alpha.18" +__version__ = "0.1.0-alpha.19" __all__ = ("celery_app",) diff --git a/pyproject.toml b/pyproject.toml index 6f59e46..319a67f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "daiv" -version = "0.1.0-alpha.18" +version = "0.1.0-alpha.19" description = "Developer assistant automating code issues, reviews, and pipeline fixes using AI Agents." readme = "README.md" license = { file = "LICENSE" } diff --git a/uv.lock b/uv.lock index b47617c..943fb55 100644 --- a/uv.lock +++ b/uv.lock @@ -402,7 +402,7 @@ wheels = [ [[package]] name = "daiv" -version = "0.1.0a18" +version = "0.1.0a19" source = { virtual = "." } dependencies = [ { name = "celery", extra = ["redis"] },