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

Update chat handling to clear chat and show help; small fix to /export #826

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

srdas
Copy link
Collaborator

@srdas srdas commented Jun 10, 2024

(1) Make sure to use the chat_history prefix in the filename if none is supplied and not use a blank string on double <Enter>. Currently the double <Enter> after /export puts an empty filename prefix as follows:
image
After the fix we get:
image

(2) When using /clear, clear the entire chat but show the help menu afterwards.

Related to #616 but will clear memory in a separate PR.

@srdas srdas added bug Something isn't working @jupyter-ai/chatui labels Jun 10, 2024
@srdas srdas requested a review from dlqqq June 10, 2024 21:22
srdas and others added 2 commits June 12, 2024 09:12
(1) Make sure to use the `chat_history` prefix in the filename if none is supplied and not use a blank string on double `<Enter>`

(2) When using `/clear` clear the entire chat but show the help menu.
Copy link
Member

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

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

@srdas Thank you! This PR works for me locally.

If the user changes their configured language model to one with a custom persona, this will show the old help message with the old persona instead of the new one. However, there are already plans to clear the chat message history entirely when the language model persona changes, so this issue can be addressed in a future PR.

@dlqqq dlqqq merged commit ff7bd1a into jupyterlab:main Jun 12, 2024
8 checks passed
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
…rt` (jupyterlab#826)

* Update chat handling

(1) Make sure to use the `chat_history` prefix in the filename if none is supplied and not use a blank string on double `<Enter>`

(2) When using `/clear` clear the entire chat but show the help menu.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @jupyter-ai/chatui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants