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

Dynamically generate help message for slash commands in chat UI #520

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

krassowski
Copy link
Member

Closes #436

There already was help property which was not used, but it was populated with longer sentences, for example:

  • in old hard-coded '/help` for chat: "Clear the chat window"
  • in help attribute: "Clears the displayed chat message history only; does not clear the context sent to chat providers"

I can imagine that in the future we could have /help learn which would use the long version, so I am proposing short_help to prefer in the chat UI summary message shown on /help.

However, this does not have to be this way, here are some alternative options which sound good to me to:

  • redefine help as being the "short help" and rename old help to long_help
  • use summary or description for "short help" keeping old help as-is
  • remove the longer help for now replacing it with the short help with chat

User-facing changes

No changes, unless user has a custom command installed, in which case these show up after the default commands but before /help:

image

@krassowski krassowski added the enhancement New feature or request label Dec 16, 2023
@krassowski krassowski marked this pull request as ready for review December 16, 2023 15:20
@JasonWeill
Copy link
Collaborator

Thank you so much for opening this PR! I think the approach is good, although I think that having both the help and short_help keys is redundant. Let's copy the short_help strings you used into help, then eliminate the short_help parameter.

@krassowski
Copy link
Member Author

Thank you @JasonWeill, done in 0eb021d.

Copy link
Collaborator

@JasonWeill JasonWeill left a comment

Choose a reason for hiding this comment

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

Thank you very much for contributing this!

@JasonWeill JasonWeill merged commit 4abacfb into jupyterlab:main Dec 19, 2023
7 checks passed
@JasonWeill
Copy link
Collaborator

@meeseeksdev please backport to 1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Dec 19, 2023
JasonWeill pushed a commit that referenced this pull request Dec 19, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
…terlab#520)

* Show help for custom slash commands

* Morph `short_help` into existing `help` per review
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
…terlab#520)

* Show help for custom slash commands

* Morph `short_help` into existing `help` per review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamically generate help message based on custom commands
2 participants