Skip to content

Conversation

rustyrazorblade
Copy link

@rustyrazorblade rustyrazorblade commented Sep 25, 2025

  • Implement readline history, navigation, and editing for CLI, API, and RAG chat modes
  • Create shared InteractiveSession class to consolidate readline functionality
  • Add command history persistence across sessions with separate files per context
  • Support built-in commands: help, clear, history, quit/exit
  • Enable arrow key navigation and command editing in all interactive modes

What does this PR do?

Related Issues

Fixes #120

Checklist

  • Tests pass (uv run pytest)
  • Code formatted (ruff format and ruff check)
  • Pre-commit hooks pass (pre-commit run --all-files)

- Implement readline history, navigation, and editing for CLI, API, and RAG chat modes
- Create shared InteractiveSession class to consolidate readline functionality
- Add command history persistence across sessions with separate files per context
- Support built-in commands: help, clear, history, quit/exit
- Enable arrow key navigation and command editing in all interactive modes
@yichuan-w yichuan-w requested a review from andylizf September 25, 2025 03:08
andylizf

This comment was marked as duplicate.

Copy link
Collaborator

@andylizf andylizf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling the interactive UX!

@rustyrazorblade rustyrazorblade force-pushed the readline branch 5 times, most recently from a7dd3ab to fdd573d Compare September 29, 2025 16:00
@rustyrazorblade
Copy link
Author

Good catch on Windows. I added exception handling around the import and a check where it's used later in the file.

I reworked and simplified the code a bit, I think it's easier to follow now, and doesn't have the recursion issue. Please let me know what you think.

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.

Improve CLI by using readline
3 participants