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

Terminal actions are not available for CustomExecution task output. #129257

Closed
elmar-peise opened this issue Jul 23, 2021 · 3 comments · Fixed by #135423
Closed

Terminal actions are not available for CustomExecution task output. #129257

elmar-peise opened this issue Jul 23, 2021 · 3 comments · Fixed by #135423
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues verified Verification succeeded web Issues related to running VSCode in the web
Milestone

Comments

@elmar-peise
Copy link

A lot of useful terminal actions are guarded by the terminalProcessSupported context key. However, even without process support, the vscode.CustomExecution mechanism used in the tasks API will stream output to terminal panels.

This means that in environment without process support, many features are not available for task output, notably including "Terminal: Focus Find" (Ctrl+F).

Can we change the preconditions/when clauses for these actions to also enable such features for task output without process support? I see two options:

  1. Remove the restrictions entirely, or
  2. Replace terminalProcessSupported with something like terminalProcessSuppported || hasCustomExecution, where hasCustomExecution would be set when a task with a vscode.CustomExecution starts.

Please let me know if either of these make sense and if you would be open to accept a corresponding pull request.

@Tyriar
Copy link
Member

Tyriar commented Oct 8, 2021

Sorry about the delay.

The restrictions are added so that we can simplify the UI such that irrelevant commands are hidden from the command palette when not needed. I think option 2 is good but maybe instead of using a hasCustomExecution context key we should have a hasHadTerminal one or something, which would switch on when the first terminal is created. Note that this doesn't just impact custom execution tasks but also the Pseudoterminal API which works in web too.

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities web Issues related to running VSCode in the web and removed terminal-triage labels Oct 8, 2021
@Tyriar Tyriar added this to the Backlog milestone Oct 8, 2021
@Tyriar
Copy link
Member

Tyriar commented Oct 19, 2021

@meganrogge we should hook these up to the new context key you made.

@alexr00
Copy link
Member

alexr00 commented Oct 28, 2021

Verified by starting a custom execution task then making sure that the Terminal: Focus Find command works.

@alexr00 alexr00 added the verified Verification succeeded label Oct 28, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues verified Verification succeeded web Issues related to running VSCode in the web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@Tyriar @elmar-peise @meganrogge @alexr00 and others