Skip to content

Commit 5293bf1

Browse files
authoredAug 19, 2024
Fix resume crash (#5)
1 parent 4181554 commit 5293bf1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
 

‎programmer/agent.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def get_last_assistant_content(history: list[Any]) -> Optional[str]:
2626

2727
# Weave bug workaround: adding two WeaveLists can create that cause
2828
# downstream crashes.
29+
# Can be removed after https://github.com/wandb/weave/pull/2165 is merged.
2930
def weavelist_add(self: Union[list, WeaveList], other: list) -> Union[list, WeaveList]:
3031
if isinstance(self, list):
3132
return self + other

‎programmer/git.py

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def create_branch(self, branch_name: str) -> None:
2828
# Create a new branch from the current HEAD
2929
self.repo.git.branch(branch_name, self.repo.head.commit.hexsha)
3030

31+
def checkout_existing(self, branch_name: str) -> None:
32+
self.repo.git.checkout(branch_name)
33+
3134
def commit_directly_to_branch(self, branch_name: str, message: str) -> str:
3235
# Ensure the branch is initialized
3336
self.create_branch(branch_name)

0 commit comments

Comments
 (0)