Skip to content

Add support for the VT Paging APIs (NP, PP, PPA) #13892

Closed
@JamesKehr

Description

@JamesKehr

Description of the new feature/enhancement

This request is for multi-layer support in a terminal. This would be used for CLI-based wizards, menus, tools (think htop), etc. without disturbing the root command line.

This is not panes or tabs, which open additional terminal processes. Each layer in the terminal would be part of the same command line process. It would be like using layers in a photo/drawing editor, but with CLI.

Example:

  1. PowerShell starts in the default layer (layer 0). This is just the normal terminal.

image

  1. A multi-layer aware wizard/menu/tool could then request a new layer from the runspace.
    a. This would be layer X (i.e. layer 1 if run from the root/default layer).
    b. The wizard/menu/tool would run in layer 1.
    c. Layer 1 would be a separate thread in the same process where the console/terminal is running. Like a ThreadJob…or something along those lines.
    d. While the wizard is running the user only sees Layer 1, while Layer 0 lurks inactive/deactivated in the background.

image

  1. The wizard completes, Layer 1 is closed, returning any objects needed back to layer 0 in the process.
  2. User continues in Layer 0 (default), right where they left off. The default console is undisturbed by the wizard.

Proposed technical implementation details (optional)

I have no idea how this would work. I only know it would be awesome 😊

I assume that PowerShell would need to know about layers to use them. I would assume changes to both PowerShell and terminal are needed. Or maybe not, if PowerShell can do all of this virtually.

If each layer is just a text buffer that's swapped in and out of the process that displays terminal/console to the user then it could be cross-platform, cross-terminal/console. Maybe… I don't know for sure. Just a thought.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VTVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-ConhostFor issues in the Console codebaseProduct-TerminalThe new Windows Terminal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions