Skip to content

Commit

Permalink
add trace for last edited artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Aug 30, 2024
1 parent 32b1ce9 commit 33cf8e7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vision_agent/tools/meta_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def create_code_artifact(artifacts: Artifacts, name: str) -> str:
artifacts[name] = ""
return_str = f"[Artifact {name} created]"
print(return_str)

display({MimeType.APPLICATION_JSON: {"last_artifact": name}})
return return_str


Expand Down Expand Up @@ -270,6 +272,7 @@ def edit_code_artifact(

artifacts[name] = "".join(edited_lines)

display({MimeType.APPLICATION_JSON: {"last_artifact": name}})
return open_code_artifact(artifacts, name, cur_line)


Expand Down Expand Up @@ -313,6 +316,8 @@ def detect_dogs(image_path: str):
artifacts[name] = code
code_lines = code.splitlines(keepends=True)
total_lines = len(code_lines)

display({MimeType.APPLICATION_JSON: {"last_artifact": name}})
return view_lines(code_lines, 0, total_lines, name, total_lines)


Expand Down Expand Up @@ -367,6 +372,8 @@ def detect_dogs(image_path: str):
artifacts[name] = code
code_lines = code.splitlines(keepends=True)
total_lines = len(code_lines)

display({MimeType.APPLICATION_JSON: {"last_artifact": name}})
return view_lines(code_lines, 0, total_lines, name, total_lines)


Expand Down

0 comments on commit 33cf8e7

Please sign in to comment.