Skip to content

Conversation

nakul-py
Copy link
Contributor

@nakul-py nakul-py commented Sep 25, 2025

Adding support for drag and drop files while editing messages in chat input.

Screencast.From.2025-09-28.20-29-12.mp4

Copy link
Contributor

Binder 👈 Launch a Binder on branch nakul-py/jupyter-chat/attachment

@brichet brichet added the bug Something isn't working label Sep 26, 2025
@brichet
Copy link
Collaborator

brichet commented Sep 26, 2025

Thanks @nakul-py for working on this.

It seems that it does not handle several editions, neither dropping the file to the main input while editing.

output.webm

I wonder if there is a way to drop the file in any input and add the attachment to that input.

@nakul-py
Copy link
Contributor Author

It seems that it does not handle several editions, neither dropping the file to the main input while editing.

Gonna fixing it :). Thanks for Attention!

@nakul-py nakul-py marked this pull request as draft September 27, 2025 11:25
@nakul-py
Copy link
Contributor Author

nakul-py commented Sep 28, 2025

I wonder if there is a way to drop the file in any input and add the attachment to that input.

Yes! Each input now has a unique data-input-id, so dropping a file automatically adds the attachment to the correct main-input or edition.

@nakul-py nakul-py marked this pull request as ready for review September 29, 2025 03:51
@nakul-py
Copy link
Contributor Author

nakul-py commented Oct 1, 2025

@brichet Any suggestion to make code changes more robust.

@brichet
Copy link
Collaborator

brichet commented Oct 9, 2025

@nakul-py I opened a PR on your branch that should reduce a bit the changes.

@nakul-py
Copy link
Contributor Author

nakul-py commented Oct 9, 2025

@brichet Now what we can do ahead as this is first time someone opens a PR to my branch?

@brichet
Copy link
Collaborator

brichet commented Oct 9, 2025

Now what we can do ahead as this is first time someone opens a PR to my branch?

If you agree with the changes, you can just merge it, it will update your branch.

@nakul-py
Copy link
Contributor Author

nakul-py commented Oct 9, 2025

@brichet I have tested this and its working very good. :)

chatCommandRegistry={props.chatCommandRegistry}
toolbarRegistry={inputToolbarRegistry}
/>
<div className="jp-chat-input-container" data-input-id={model.input.id}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This container is probably not necessary anymore (looks like I forgot to remove it).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok i will look into it!

Copy link
Collaborator

@brichet brichet left a comment

Choose a reason for hiding this comment

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

Thanks @nakul-py, looks good.

@brichet brichet merged commit 37205de into jupyterlab:main Oct 15, 2025
12 checks passed
@nakul-py nakul-py deleted the attachment branch October 15, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag and drop on message edition

2 participants