nx-console
nx-console copied to clipboard
Would be nice to see terminal tasks in VS Code without "nx run " prefix
Description
Currently all tasks started in nx console are prefixed by nx run in the terminal pane to can be hard to distinguish my-app and my-app-api. It'd be nice the have the names just be of the form <project>:<task>
Motivation
Easier switching between terminal windows
Suggested Implementation
name property on creationOptions https://code.visualstudio.com/api/references/vscode-api#Terminal
Alternate Implementations
it's not a bad idea :) maybe we could even add the Nx icon to make it easy to spot without the nx run.
Since you've already found the right spot to control the behaviour, would you be interested in contributing this?
@MaxKless sure, I'll dig in
Awesome that's great to hear. If you need any help or pointers feel free to ping me here or on twitter :)
Appreciate it
if I can help with anything @AdditionAddict let me know :)
@AdditionAddict Have you made any progress on this?
I don't think this is happening, the issue has been lying around for a bit. If you want to take over, @mkapal I'd be glad to help out. This should be a good issue to get to know the codebase a bit more easily.
OK, I'm having a look.
Besides nx run, there can be other commands running like nx run-many or nx affected:
How should these cases be handled? I like the idea of having the Nx icon next to the command name so we can get rid of the nx prefix for all Nx tasks. For nx run tasks, maybe there could be a "run" icon so the task names can be without nx run? Or do you have other thoughts?
I'm thinking if we have an nx icon, just saying server:serve would be enough honestly. From your examples I would do this:
server:serveclient:serverun-many --target=test --watchaffected --target=test --watch
The full command will still be visible at the top if people want to see it
OK, I will try.
By the way, what's the difference between the CliTask and NxTask class? Their implementation looks very similar.
honestly, I'm not sure. I think it has to do with vscode's task api but I don't recall the details right now