-
Notifications
You must be signed in to change notification settings - Fork 725
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
Extend PromptSession to a full screen application #672
Comments
Hi @techtonik, I'm really not sure about this, honestly. I've no idea what the APIs would look like in this case. I understand that combining the ideas of what |
Here is how to get application object from
Now it needs some experiments - how to add/call Dialogs to/from it. |
Could you explain further your thinking about why this would be good @techtonik? My thoughts so far: Is it possible to de-couple the application from the From my limited understanding, right now, we need to build a |
The only reason I have is that learning curve to go from prompt tutorial to a full screen application is too steep. Mentioning how to embed |
Couldn't the layout engine operate at a lower level? For example it would directly handle multiplexing stdin/stdout, which would eliminate the need for a major refactor. |
Thank you for this great library! I am also trying to create a full-screen application that embeds a
I was able to get the following example working but I am now facing an issue with the fact that I can't use a class MyPromptSession(PromptSession):
def _create_layout(self):
custom_buffer = Buffer()
custom_window = Window(BufferControl(buffer=custom_buffer))
layout = super()._create_layout()
main_window = layout.container
return Layout(
HSplit(children=[main_window, custom_window], # <-- I can't use VSplit here :(
padding_char='*',
padding=1,
),
main_window
) Any help will be greatly appreciated! |
@codingedward Is the rest of your code available somewhere for me to have a look at? |
Instead of trying to embed prompt into full screen app (#652 #640), is it possible to just extend PromptSession, because it is already the app that runs the event loop?
The text was updated successfully, but these errors were encountered: