Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/codegen/extensions/tools/relace_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,13 @@ def relace_edit(codebase: Codebase, filepath: str, edit_snippet: str, api_key: O
try:
file = codebase.get_file(filepath)
except ValueError:
msg = f"File not found: {filepath}"
raise FileNotFoundError(msg)
# Return an observation with error status instead of raising an exception
# Include the full filepath in the error message
return RelaceEditObservation(
status="error",
error=f"File not found: {filepath}. Please provide the full filepath relative to the repository root.",
filepath=filepath,
)

# Get the original content
original_content = file.content
Expand Down
Loading