Skip to content

Commit faa4ccb

Browse files
author
Your Name
committed
Attempt auto committing in the Finished tool if called
1 parent 1d14192 commit faa4ccb

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cecli/tools/finished.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Tool(BaseTool):
2020
}
2121

2222
@classmethod
23-
def execute(cls, coder, **kwargs):
23+
async def execute(cls, coder, **kwargs):
2424
"""
2525
Mark that the current generation task needs no further effort.
2626
@@ -30,7 +30,11 @@ def execute(cls, coder, **kwargs):
3030

3131
if coder:
3232
coder.agent_finished = True
33-
# coder.io.tool_output("Task Finished!")
33+
34+
if coder.files_edited_by_tools:
35+
_ = await coder.auto_commit(coder.files_edited_by_tools)
36+
coder.files_edited_by_tools = set()
37+
3438
return "Task Finished!"
3539

3640
# coder.io.tool_Error("Error: Could not mark agent task as finished")

0 commit comments

Comments
 (0)