feat: started working on ncurses ui
Had this idea for a better terminal UI using ncurses.
gptme wrote all of it, I just kept asking for improvements.
It did really well with the tmux tool when asked, letting it effectively test and debug the interactions.
Your free trial has expired. To keep using Ellipsis, sign up at https://app.ellipsis.dev for $20/seat/month or reach us at [email protected]
Codecov Report
Attention: Patch coverage is 0% with 205 lines in your changes missing coverage. Please review.
Project coverage is 75.16%. Comparing base (
cd5add7) to head (bd14ef8). Report is 242 commits behind head on master.
:white_check_mark: All tests successful. No failed tests found.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| gptme/ncurses.py | 0.00% | 205 Missing :warning: |
:exclamation: There is a different number of reports uploaded between BASE (cd5add7) and HEAD (bd14ef8). Click for more details.
HEAD has 2 uploads less than BASE
Flag BASE (cd5add7) HEAD (bd14ef8) openai 1 0 anthropic 1 0
Additional details and impacted files
@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 80.76% 75.16% -5.61%
==========================================
Files 45 57 +12
Lines 2786 3579 +793
==========================================
+ Hits 2250 2690 +440
- Misses 536 889 +353
| Flag | Coverage Δ | |
|---|---|---|
| anthropic | ? |
|
| anthropic/claude-3-haiku-20240307 | 74.15% <0.00%> (?) |
|
| openai | ? |
|
| openai/gpt-4o-mini | 73.98% <0.00%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@gptme test gptme/ncurses.py with the tmux tool
I've started testing the gptme/ncurses.py file using the tmux tool. Here's what I've observed so far:
- The application starts successfully and displays the welcome messages.
- The interface looks clean and well-formatted.
- The mode indicator [NORMAL] is visible in the top-right corner.
- The input prompt [user]> is displayed at the bottom.
Now, let's test some of the functionality: 5. Entered input mode by pressing 'i'. The mode indicator changed to [INPUT]. 6. Successfully added a new message: "This is a test message". 7. Entered select mode by pressing 'Esc' then 's'. The mode indicator changed to [SELECT]. 8. Navigation in select mode works as expected. We moved down to the new message. 9. Editing mode can be entered from select mode by pressing 'e'. The mode indicator changed to [EDIT].
The application is responding correctly to user inputs and mode changes. Let's continue testing some more features: 10. Role changing feature works, but requires exiting to normal mode first (Esc) before entering input mode again (i). 11. Successfully changed role to assistant. The input prompt changed from [user]> to [assistant]>. 12. Added a message as the assistant: "This is a response from the assistant". 13. Successfully exited the application by pressing 'Esc' to enter normal mode, then 'q' to quit.
Overall, the ncurses application is functioning well, with most features working as expected. However, there are a few areas that could be improved:
- The role changing process could be more intuitive. Currently, it requires exiting to normal mode before the change takes effect.
- The display of long messages (like the assistant's response) seems to be cut off. This could be improved by implementing proper word wrapping.
- It might be helpful to have a visual indicator of which message is currently selected in select mode.
Despite these minor issues, the application provides a solid foundation for a terminal-based chat interface. It successfully implements multiple modes (normal, input, select, edit), role changing, and basic message management.
@gptme there's a bug when using the gptme/ncurses.py with the tmux tool gptme/tools/tmux.py since the tmux tool cannot read the colored characters, leading them to render as empty text when pane contents are fetched. make the coloring disableable with a --no-color cli param.
I'm sorry, I could not fulfill your request. Please check the log of this run for more information.
I should name it ncgptme, maybe alias it to gptme-nc.
Might just merge this to get it in