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

Support Notebook 7 #504

Closed
jtpio opened this issue Dec 5, 2023 · 5 comments · Fixed by #827
Closed

Support Notebook 7 #504

jtpio opened this issue Dec 5, 2023 · 5 comments · Fixed by #827
Labels
enhancement New feature or request

Comments

@jtpio
Copy link
Member

jtpio commented Dec 5, 2023

Looking at the code, there seems to be some components that expect to work on a LabShell only:

if (!(shell instanceof LabShell)) {

Which can prevent using the extension in other lab-based applications such as Notebook 7.

Maybe there can be a way to make jupyter-ai work in more lab-based applications? Even if only a limited set of features is available.

For instance this could allow for code completions in Notebook 7.1 (based on #465). Below is an example running https://github.com/krassowski/jupyterlab-transformers-completer:

inline-completer.mp4
Copy link

welcome bot commented Dec 5, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jtpio
Copy link
Member Author

jtpio commented Dec 5, 2023

Maybe the following could be replaced by app.shell.currentWidget?

this._mainAreaWidget = args.newValue;

Since currentWidget is part of the JupyterFrontEnd.IShell interface:

@ellisonbg
Copy link
Contributor

Thanks for bringing this up. We have some early UX designs for a slightly different (optional) UX that would work well in notebook. Certainly the inline completer stuff in #465 should work in notebook, but we would like to have a chat experience as well. @andrii-i do you have some of the UX mocks we did for the lightweight chat UX for cells (I think we called in a "popup UX" or something?

@dlqqq dlqqq mentioned this issue Dec 6, 2023
8 tasks
@andrii-i
Copy link
Collaborator

andrii-i commented Dec 6, 2023

Here are mockups for "in-editor dialog/popup UI" as we call it:

  1. On in-editor text selection or text area interaction, icon to the left of the cell appears
    image

  2. When icon is clicked, in-editor Jupyter AI dialog/popup UI appears
    image

Please also see relevant issue

@krassowski
Copy link
Member

Just FYI, the chat could already by placed in the left or right sidebar:

image

image

I think that the selection-oriented pop-up could be very useful for reformatting and infill tasks (and not hard to implement given CodeMirror6 uses its own, programmatic selection layer). I could also see the chat as optionally configurable mini-window that can be dragged around, though if you are interested in enabling users today, placing the chat in the sidebar is a no-brainer.

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 a pull request may close this issue.

5 participants