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

Add Jump to File button and Git diff viewer #6613

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

Conversation

xingyaoww
Copy link
Collaborator

@xingyaoww xingyaoww commented Feb 5, 2025

This PR addresses issue #5716 by adding a Jump to File button in the ExpandableMessage component and implementing a Git diff viewer in the file explorer.

Changes made:

  • Added a Jump to File button in the ExpandableMessage component
  • Created a GitDiffViewer component
  • Implemented a getGitDiff function in the OpenHands API
  • Created a useGitDiff hook to fetch git diffs
  • Updated the FileExplorer component to display git diffs

Fixes #5716


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:0ee4339-nikolaik   --name openhands-app-0ee4339   docker.all-hands.dev/all-hands-ai/openhands:0ee4339

@xingyaoww xingyaoww force-pushed the feature/file-viewer-jump-button branch from 4a1b281 to d85efda Compare February 5, 2025 20:54
- Remove duplicate message.d.ts
- Add ChatMessage type for regular messages
- Fix type definitions in message.tsx
- Update test file to use correct Message type
- Fix type comparison issues
The message.d.ts file contains a simpler Message type used for basic chat messages,
while types/message.tsx contains the full type system for all message types.
Both are needed for different purposes.
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.

[Feature Request]: Add the button to jump to file edits view
2 participants