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

Shell Integration causes weird characters in PowerShelll prompt #242507

Open
tanrikut opened this issue Mar 3, 2025 · 5 comments
Open

Shell Integration causes weird characters in PowerShelll prompt #242507

tanrikut opened this issue Mar 3, 2025 · 5 comments
Assignees

Comments

@tanrikut
Copy link

tanrikut commented Mar 3, 2025

Type: Bug

When I enable shell integration with PowerShell, the injected script causes extremely long text with weird characters inside. It seems like the contents of PATH environment variable or so with wrong encoding.

尰\x5cu0085巸\x5cu0085\x3bC:\x5c\x5cUsers\x5c\x5ctkoray\x5c\x5c.dotnet\x5c\x5ctools\x3bC:\x5c\x5cUsers\x5c\x5ctkoray\x5c\x5cAppData\x5c\x5cLocal\x5c\x5cPrograms\x5c\x5cFiddler\x3bC:\x5c\x5cUsers\x5c\x5ctkoray\x5c\x5c.dotnet\x5c\x5ctools\x3bC:\x5c\x5cUsers\x5c\x5ctkoray\x5c\x5cAppData\x5c\x5cLocal\x5c\x5cMicrosoft\x5c\x5cWindowsApps\x3bC:\x5c\x5cUsers\x5c\x5ctkoray\x5c\x5cAppData\x5c\x5cLocal\x5c\x5cMicrosoft\x5c\x5cWinGet\x5c\x5cLinks\x3bC:\x5c\x5cUsers\x5c\x5ctkoray\x5c\x5cAppData\x5c.........

I tried a few settings combinations with decorations, shell integration and envrionment reporting and see that enabling "terminal.integrated.shellIntegration.environmentReporting" causes this issue. As workaround, this setting can be disabled

VS Code version: Code - Insiders 1.98.0-insider (c7a5cfe, 2025-02-28T22:42:41.870Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3302)
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) 15.69GB (2.67GB free)
Process Argv --crash-reporter-id 05811b17-16f9-4e83-9da6-fcac3bd03f8c
Screen Reader no
VM 0%
Extensions (41)
Extension Author (truncated) Version
ng-template Ang 19.2.0
vscode-office cwe 3.5.0
vscode-markdownlint Dav 0.59.0
gitlens eam 2025.3.304
prettier-vscode esb 11.0.0
copilot Git 1.276.1406
copilot-chat Git 0.25.2025030302
remotehub Git 0.65.2024112101
camelcasenavigation map 1.1.5
vscode-docker ms- 1.29.4
playwright ms- 1.1.13
prompty ms- 0.1.2024092301
remote-containers ms- 0.400.0
remote-ssh ms- 0.117.1
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.5
vscode-remote-extensionpack ms- 0.26.0
azure-repos ms- 0.41.2024112101
js-debug-nightly ms- 2025.2.1117
remote-explorer ms- 0.5.2025021709
remote-repositories ms- 0.43.2024112101
remote-server ms- 1.5.2
vscode-speech ms- 0.12.1
vscode-websearchforcopilot ms- 0.1.2025022801
playwright-snippets nit 1.0.1
java red 1.41.2025030108
markdown-preview-enhanced shd 0.8.15
sonarlint-vscode Son 4.16.0
intellicode-api-usage-examples Vis 0.2.9
vscodeintellicode Vis 1.3.2
vscode-spring-boot vmw 1.61.2025030309
vscode-gradle vsc 3.16.2024111106
vscode-java-debug vsc 0.58.2025022807
vscode-java-dependency vsc 0.24.1
vscode-java-pack vsc 0.29.2024091906
vscode-java-test vsc 0.43.0
vscode-lombok vsc 1.1.2024071804
vscode-maven vsc 0.44.2024072906
vscode-spring-boot-dashboard vsc 0.14.2024073000
vscode-spring-initializr vsc 0.11.2024112703
markdown-all-in-one yzh 3.6.2
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551:31249597
vscod805:30301674
py29gd2263:31024238
vscaat:30438846
c4g48928:30535728
a9j8j154:30646983
962ge761:30841072
dsvsc014:30777825
dsvsc015:30821418
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
pythonait:30973460
dwnewjupyter:31046869
nativerepl1:31134653
pythonrstrctxt:31093868
nativeloc1:31118317
e80f6927:31120813
iacca1:31150324
notype1:31143044
dwcopilot:31158714
c3hdf307:31184662
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
f27dg485:31233432
g012b348:31231168
jda6j935:31233686
copilothoveroff:31247700
treesitterini:31241649
fh1c7952:31247580

@tanrikut
Copy link
Author

tanrikut commented Mar 3, 2025

If this setting is disabled, prompt seems ok but shell integration with Copilot Agent is not working

@anthonykim1
Copy link
Contributor

Could you explain what you mean by shell integration with copilot agent?

Disabling "terminal.integrated.shellIntegration.environmentReporting" to false should resolve your particular issue for the prompt, but that shouldnt affect other things that are related to shell integration in general.

@tanrikut
Copy link
Author

tanrikut commented Mar 6, 2025

I am using Copilot Edits in Agent mode. It should be able to read the outputs of the commands that it sends to the terminal when shellIntegration is enabled. It was not able to do so if it is marked as enabled.

Actually after a complete restart and a few updates, integration problem seems to be resolved.

@Tyriar
Copy link
Member

Tyriar commented Mar 6, 2025

@tanrikut do you have terminal.integrated.windowsUseConptyDll or terminal.integrated.windowsEnableConpty set?

I am using Copilot Edits in Agent mode. It should be able to read the outputs of the commands that it sends to the terminal when shellIntegration is enabled. It was not able to do so if it is marked as enabled.

We're tracking a few issues related to the reliability of the run in terminal copilot tool. This is the main one: #242195

@tanrikut
Copy link
Author

tanrikut commented Mar 6, 2025

@Tyriar yes both are set. (enabled)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants