Skip to content

Comments

Clear input immediately after sending message#365

Merged
brichet merged 4 commits intojupyterlab:mainfrom
nakul-py:input-clears
Feb 23, 2026
Merged

Clear input immediately after sending message#365
brichet merged 4 commits intojupyterlab:mainfrom
nakul-py:input-clears

Conversation

@nakul-py
Copy link
Contributor

@nakul-py nakul-py commented Feb 19, 2026

Before the button waits for streaming to finish before clearing the input.

Now we Clear the input without awaiting the call.

Originally posted by @jtpio in jupyterlite/ai#260 (comment)

@github-actions
Copy link
Contributor

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

@nakul-py nakul-py marked this pull request as draft February 19, 2026 11:12
@brichet brichet added the bug Something isn't working label Feb 19, 2026
@nakul-py nakul-py marked this pull request as ready for review February 19, 2026 13:23
@nakul-py
Copy link
Contributor Author

we could probably revert it to model.send(...) as it was before #298

Yes i did it. Is this look okay?


model.value = '';
model.focus();
model.send(body);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @nakul-py for working on this.

Shouldn't we keep the focus on the input ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we can

@nakul-py nakul-py requested a review from brichet February 20, 2026 08:24
@nakul-py nakul-py marked this pull request as draft February 20, 2026 10:23
@nakul-py nakul-py marked this pull request as ready for review February 20, 2026 14:49
@nakul-py nakul-py closed this Feb 20, 2026
@nakul-py nakul-py reopened this Feb 20, 2026
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, LGTM

@brichet brichet merged commit d0e26fe into jupyterlab:main Feb 23, 2026
12 checks passed
@nakul-py nakul-py deleted the input-clears branch February 24, 2026 04:12
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.

2 participants