Skip to content

Commit

Permalink
fix: missing new_str field in create command output & add error m…
Browse files Browse the repository at this point in the history
…essage to structured output (#32)

* fix missing new_str field in create command output

* decrease pr freq

* add error message to formatted output
  • Loading branch information
ryanhoangt authored Dec 20, 2024
1 parent 123d287 commit 161940f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 10
groups:
python-packages:
Expand All @@ -16,4 +16,4 @@ updates:
prefix: "⬆️"
include: "scope"
labels:
- "dependencies"
- "dependencies"
3 changes: 2 additions & 1 deletion openhands_aci/editor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def file_editor(
insert_line: int | None = None,
enable_linting: bool = False,
) -> str:
result: ToolResult | None = None
try:
result = _GLOBAL_EDITOR(
command=command,
Expand All @@ -39,7 +40,7 @@ def file_editor(
enable_linting=enable_linting,
)
except ToolError as e:
return _make_api_tool_result(ToolResult(error=e.message))
result = ToolResult(error=e.message)

formatted_output_and_error = _make_api_tool_result(result)
marker_id = uuid.uuid4().hex
Expand Down
1 change: 1 addition & 0 deletions openhands_aci/editor/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def __call__(
self._file_history[_path].append(file_text)
return CLIResult(
path=str(_path),
new_content=file_text,
prev_exist=False,
output=f'File created successfully at: {_path}',
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openhands-aci"
version = "0.1.3"
version = "0.1.4"
description = "An Agent-Computer Interface (ACI) designed for software development agents OpenHands."
authors = ["OpenHands"]
license = "MIT"
Expand Down

0 comments on commit 161940f

Please sign in to comment.