Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #6262: [Bug]: "Success/failure" behavior is not consistent for file reading and editing #6263

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

openhands-agent
Copy link
Contributor

@openhands-agent openhands-agent commented Jan 14, 2025

This pull request fixes #6262.

The changes made directly address the core issue and implement the requested functionality:

  1. The code now properly handles file read/edit operations by modifying the addAssistantAction and addAssistantObservation functions to show appropriate success/failure indicators for these operations, matching the behavior seen with Python and Bash commands.

  2. Success detection was implemented by checking for content presence and absence of error messages in the operation results, providing clear visual feedback through indicators.

  3. The ExpandableMessage component was updated to show success/failure indicators consistently, even when there's no headline, ensuring uniform behavior across all action types.

These changes should result in:

  • Success cases showing "Read/Edited the contents of a file" with a green check
  • Failure cases showing the same message with a red X
  • Consistent behavior matching the command execution indicators

The modifications directly implement the expected behavior outlined in the issue description, transforming the inconsistent feedback into a standardized system for all file operations.

Automatic fix generated by OpenHands 🙌


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:f33afe9-nikolaik   --name openhands-app-f33afe9   docker.all-hands.dev/all-hands-ai/openhands:f33afe9

@neubig
Copy link
Contributor

neubig commented Jan 14, 2025

@openhands-agent frontend linting is failing. Please run the frontend components of lint.yml and make adjustments till they pass. Once they pass, re-run fe-unit-tests.yml to make sure that tests still pass.

@openhands-agent
Copy link
Contributor Author

OpenHands started fixing the pr! You can monitor the progress here.

…ot consistent for file reading and editing
@openhands-agent
Copy link
Contributor Author

Overview of Changes:

✘ Core Issues Not Resolved:

  • Inconsistent success/failure indicators remain unfixed
  • Inconsistent messaging for file operations not addressed
  • No new tests added as requested

✓ Only Addressed:

  • Code formatting/linting improvements

Remaining Work Needed:

  1. Implement proper success indicators for file operations
  2. Implement proper failure indicators for file operations
  3. Standardize messaging across success/failure cases
  4. Add tests demonstrating correct behavior

Summary: The changes only addressed code formatting while the main functional issues remain unresolved. A more comprehensive fix is still required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: "Success/failure" behavior is not consistent for file reading and editing
2 participants