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

API to tell if a Terminal is a Task Terminal #234440

Open
karthiknadig opened this issue Nov 22, 2024 · 2 comments
Open

API to tell if a Terminal is a Task Terminal #234440

karthiknadig opened this issue Nov 22, 2024 · 2 comments
Assignees
Labels
api feature-request Request for new features or functionality tasks Task system issues terminal Integrated terminal issues

Comments

@karthiknadig
Copy link
Member

Type: Bug

Currently there is no way for extensions to detect the active terminal is a task. This is needed to determine if send text would work or not.

VS Code version: Code - Insiders 1.96.0-insider (9086857, 2024-11-22T09:56:24.579Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.60GB (14.23GB free)
Process Argv --folder-uri file:///c%3A/GIT/LSP/pygls --log trace --log ms-python.python=info --crash-reporter-id 4fb1ebc1-cf4c-4880-a88a-47738ec3768d
Screen Reader no
VM 0%
Extensions (19)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.6.2
ruff cha 2024.56.0
esbuild-problem-matchers con 0.0.3
vscode-eslint dba 3.0.10
gitlens eam 16.0.2
EditorConfig Edi 0.16.4
prettier-vscode esb 11.0.0
copilot Git 1.245.1224
copilot-chat Git 0.23.2024112103
vscode-github-actions git 0.27.0
vscode-pull-request-github Git 0.101.2024112104
debugpy ms- 2024.12.0
python ms- 2024.21.0-dev
vscode-pylance ms- 2024.11.3
vscode-python-envs ms- 0.0.0
remote-containers ms- 0.388.0
remote-wsl ms- 0.88.5
extension-test-runner ms- 0.0.12
code-spell-checker str 4.0.21
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vsc_aacf:30263846
pythonvspyt551:31179976
vscod805cf:30301675
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
vscrpc:30624061
a9j8j154:30646983
962ge761:30841072
pythonnoceb:30776497
asynctok:30898717
dsvsc014:30777825
dsvsc015:30821418
pythonmypyd1:30859725
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
pythonait:30973460
0ee40948:31013168
dvdeprecation:31040973
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
nativerepl1:31134653
pythonrstrctxt:31093868
nativeloc1:31118317
cf971741:31144450
notreesitter:31116712
e80f6927:31120813
iacca1:31150324
notype1:31143044
dwcopilot:31158714
h409b430:31177054
5b1c1929:31184661

@karthiknadig
Copy link
Member Author

Another use case is figuring out the context for buttons:
https://github.com/microsoft/vscode-python-environments/issues/27

@meganrogge meganrogge added feature-request Request for new features or functionality api tasks Task system issues terminal Integrated terminal issues labels Nov 23, 2024
@meganrogge
Copy link
Contributor

We already have this internally on the slc , we'd just need to expose it cc @Tyriar

const type = this.shellLaunchConfig.attachPersistentProcess?.type || this.shellLaunchConfig.type;
switch (type) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature-request Request for new features or functionality tasks Task system issues terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

2 participants