Skip to content

Conversation

@Carreau
Copy link
Contributor

@Carreau Carreau commented Dec 19, 2024

I'm trying to be the least invasive;
But the idea is to allow access to previous lines when rendering a line in order to shift them down; and display multiline sugestions.

With this I can add minimal modifications into IPython that allows multiline suggestions (typically would be created by an LLM – while not a big fan, there is a lot of requests for it.

I'm going to assume there is no willingness tochange the current API for transformers to get at least a ranges of lines instead of lines, it would be easier to handle.

I do not include any update to the transformers we use in IPython to display those completions; but once battled tested a bit more, I'm happy to contribute it as well.


Here is what it could looks like in IPython for example.

Screen.Recording.2024-12-19.at.14.03.28.mov
I'm trying to be the least invasive; But the idea is to allow access to previous lines when rendering a line in order to shift them down; and display multiline sugestions. With this I can add minimal modification into IPython that allows multiline suggestion (typically would be created by an LLM – while not a big fan, there is a lot of requests for it. I'm going to assume there is no willingness tochange the current API for transformers to get at least a ranges of lines instead of lines, it would be easier to handle. I do not include any update to the transformers we use in IPython to display those completions; but once battled tested a bit more, I'm happy to contribute it as well.
@jonathanslenders jonathanslenders merged commit 8ea3306 into prompt-toolkit:master Jan 1, 2025
6 checks passed
@jonathanslenders
Copy link
Member

Thank you!

@Carreau
Copy link
Contributor Author

Carreau commented Jan 1, 2025

Thanks, and happy new year.

I'll contribute some examples that show how one can achieve showing multiple lines later this month.

@Carreau Carreau deleted the multiline-sugg branch January 8, 2025 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants