-
Notifications
You must be signed in to change notification settings - Fork 14
feat(cli): Add conversation listing and loading functionality #54
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
base: main
Are you sure you want to change the base?
Conversation
This commit adds comprehensive conversation management features to the OpenHands CLI: New Features: - /list command: Display all past conversations with metadata - /load command: Resume a conversation by ID (supports both full UUID and short ID) - Tab completion for conversation IDs in the /load command Implementation: - ConversationManager class for discovering and managing conversations - ConversationInfo class for conversation metadata with formatting utilities - Enhanced CommandCompleter with conversation ID completion support - Robust conversation discovery handling various storage formats Files Added: - openhands_cli/conversation_manager.py: Core conversation management - openhands_cli/fast_help.py: Helper utilities - openhands_cli/llm_utils.py: LLM-related utilities - openhands_cli/listeners/loading_listener.py: Event listener for loading - tests/test_conversation_manager.py: Comprehensive test suite - tests/test_loading.py: Loading functionality tests Files Modified: - openhands_cli/agent_chat.py: Added /list and /load command handlers - openhands_cli/tui/tui.py: Enhanced command completion - openhands-cli.spec: Updated PyInstaller configuration This functionality was migrated from OpenHands/OpenHands#11197
|
@OpenHands please fix the failing actions on PR #54 at branch |
|
I'm on it! xingyaoww can track my progress at all-hands.dev |
- Fix test_commands_dict in tests/test_tui.py to match actual implementation - Fix bare except clauses in conversation_manager.py with specific Exception - Fix long lines throughout the codebase (E501 errors) - Fix isinstance checks to use proper tuple syntax - Fix type annotations (use | None instead of Optional) - Add null checks for optional types in tests - Fix format_date() call with missing parameter - Add type: ignore comments for unavoidable import issues - Split long strings and format texts across multiple lines All tests passing (164 passed), pre-commit checks pass.
SummaryI've successfully fixed all failing GitHub Actions on PR #54 (branch ✅ Issues Fixed1. Pre-commit Checks (Ruff, Pycodestyle, Pyright)
2. Unit Tests
3. Type Checking Errors
📊 Verification
The GitHub Actions should now pass when they re-run on the updated branch. All fixes were focused on resolving the specific linting, type checking, and test failures without any extraneous changes. |
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
|
@OpenHands please fix the failing actions on PR #54 at branch |
|
I'm on it! xingyaoww can track my progress at all-hands.dev |
The executable name in the spec file is 'openhands-cli' but the test function in build.py was looking for 'openhands'. This caused the build test to fail even though the executable was successfully created. This commit updates: - build.py: Change executable path from 'dist/openhands' to 'dist/openhands-cli' - README.md: Update documentation to reflect correct executable name Fixes the failing 'CLI - Build binary and optionally release' GitHub Action.
SummaryI've successfully fixed the failing GitHub Actions on PR #54 (branch Problem IdentifiedThe "CLI - Build binary and optionally release" workflow was failing because of a mismatch in executable naming:
Changes MadeCommit d0395bf: "fix: correct executable name in build.py test function"
Verification✅ All GitHub Actions are now passing:
The fix has been committed and pushed to the |
Summary
This PR adds the ability to list and load past conversations in the OpenHands CLI interface, addressing the user request for conversation management functionality.
Note: This PR was migrated from OpenHands/OpenHands#11197 as part of the CLI migration to this standalone repository.
Changes
New Features
/listcommand: Display all past conversations with metadata including:/load <id>command: Resume a conversation by ID (supports both full UUID and short ID)/loadcommandImplementation Details
Code Quality
Files Changed
New Files
openhands_cli/conversation_manager.py- Core conversation management functionalityopenhands_cli/fast_help.py- Helper utilitiesopenhands_cli/llm_utils.py- LLM-related utilitiesopenhands_cli/listeners/loading_listener.py- Event listener for loadingtests/test_conversation_manager.py- Comprehensive test suitetests/test_loading.py- Loading functionality testsModified Files
openhands_cli/agent_chat.py- Added command handlers for/listand/loadopenhands_cli/tui/tui.py- Enhanced command completion and added new commandsopenhands-cli.spec- Updated PyInstaller configurationUsage Examples
List conversations
Load a conversation
Future Enhancements
The current implementation provides a solid foundation for conversation management. Future enhancements could include:
Compatibility
@xingyaoww can click here to continue refining the PR