Skip to content
New issue

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

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

Already on GitHub? # to your account

Graceful shutdown / Save last chat + "Projects" feature request #42

Open
ob7 opened this issue Dec 9, 2024 · 0 comments
Open

Graceful shutdown / Save last chat + "Projects" feature request #42

ob7 opened this issue Dec 9, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ob7
Copy link
Contributor

ob7 commented Dec 9, 2024

When closing tenere, the current chat will not be saved.

Now that history is persistent and ctrl + s is no longer used to manually save the chats, it would make sense to make sure the program saves the current chat before exiting the program, such as when pressing "q".

Otherwise, the user has to start a new chat before closing to ensure the previous chat is saved.
Or bring back the ctrl + s keybinding that will cause the current tenere.archive-% to be saved.

O perhaps do both; bring back the ctrl + s keybinding so user can have peace of mind their chat was saved... then call that function whenever program goes for shutdown.


BTW thanks for making the history persistent, works well (I did notice a history file being overwritten somehow though). I had a related idea in mind when suggesting persistent history that would support a kind of projects functionality. Basically would work how it does currently but instead of chats being saved to .local/share/tenere/tenere.archive-%, there would be a subdirectory for each project with the relative chats such as .local/share/tenere/my-project/tenere.archive-%.

One could either select the project in the terminal somehow or just specify it via command line, then whatever is in the history is related to that specific project. If no project is specified it could just use a default project directory where the tenere.archive-% files get dumped which could be .local/share/tenere/default/

tenere -p my-project would create a ./local/share/tenere/my-project directory if it doesn't exist,
persistent history functionality would then save tenere.archive files there

tenere -p my-project if ./local/share/tenere/my-project already exists would create the history based on files in ./local/share/tenere/my-project instead of default data directory

and if one simply runs tenere without specifying project if loads history from ./local/share/tenere/default/

Additionally, if one is specifying a project when loading tenere, loading the last saved chat for that project may make sense, but doesn't make sense when starting tenere without specifying a project. That being said I don't think this would be an option until an entirely different feature is built which would allow for the continuance of previous chats after they have been closed ( by opening history, pressing enter on an entry and that loads that chat into main view where the chat can be continued ).

I think having this kind of projects functionality would be a super useful feature for heavy LLM users.
Also, given the simplicity of tenere's UI it would be very down to earth for cmd line users.

@pythops pythops added the enhancement New feature or request label Dec 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants