Skip to content

feat: Adding /file command #118

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

nakul-py
Copy link

@nakul-py nakul-py commented Jul 4, 2025

Add a new /file slash command that opens a file browser slider to select and inject file paths into the chat input.

file.Command.mp4

@nakul-py nakul-py changed the title feat:-Adding /file command feat: Adding /file command Jul 4, 2025
@nakul-py
Copy link
Author

nakul-py commented Jul 5, 2025

Related to #103

@jtpio
Copy link
Member

jtpio commented Jul 7, 2025

Thanks @nakul-py for working on this!

Wondering if we will also be available to leverage the change that was recently merged in jupyter-chat (jupyterlab/jupyter-chat#248)? This still needs a release of jupyter-chat before we can use it here.

@nakul-py
Copy link
Author

nakul-py commented Jul 7, 2025

Yes, @jtpio we can also work on drag and drop feature now as jupyter-chat publish release for the drag and drop feature. Will we add this drag and drop feature with this pr or with another?

@brichet
Copy link
Collaborator

brichet commented Jul 8, 2025

Thanks @nakul-py.

First, I really like the UI of the file selector, maybe something similar could be ported upstream in Jupyterlab, instead of the current file selector.

About the current PR, I'm not sure about the user experience of it, since you have to “send” the message once to display the file dialog, and then send it again after selecting the file.

jupyter-chat already provides an attach button, that could be added to the current chat by providing an IDocumentManager to the model. It can be tried at https://jupyter-chat.readthedocs.io/en/latest/lite/lab/index.html.
One advantage of using the button is that it natively uses the attachments API of jupyter-chat, and adds the attachments to the messages.

Do you think that we should/could take advantage of the existing UI/UX of jupyter-chat ?

@nakul-py
Copy link
Author

nakul-py commented Jul 9, 2025

First, I really like the UI of the file selector, maybe something similar could be ported upstream in Jupyterlab, instead of the current file selector.

Yes @brichet we can do same for Jupyterlab.

jupyter-chat already provides an attach button, that could be added to the current chat by providing an IDocumentManager to the model. It can be tried at jupyter-chat.readthedocs.io/en/latest/lite/lab/index.html.
One advantage of using the button is that it natively uses the attachments API of jupyter-chat, and adds the attachments to the messages.

I think we can use the attach button instead of using /file command everytime to attach files as in jupyter-chat.

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.

3 participants