text:
FZ editor: allow standalone debugging

Currently, in order to start the FZ editor in the debugger as a standalone app, you have to set the command line arguments in the project properties.
65537 <- HMONITOR monitor
0_0_2560_1400 <- area for editor position (screen minus taskbar) DPI scaled
2560_1440 <- zone work area NOT DPI scaled
C:\Users\%uusername%\AppData\Local\Temp\xbko.1 <- system generated tmp file
C:\Users\%uusername%\AppData\Local\Temp\xbko.2 <- system generated tmp file
C:\Users\%uusername%\AppData\Local\Temp\xbko.0 <- system generated tmp file

We should add the ability to start it standalone, in debug mode, without having to pass the arguments.

Upon a quick reflection, why. Is the launching via VS with those Parameters set not enough?

If you launch PT in the debugger, then when the FZ editor start, you have to manually attach the debugger.
But this is not the scenario we want to improve. The scenario is to set the FZ editor as the startup project and launch it directly without having to start PT first.
In that scenario you have to manually add the parameters in the project properties. And change them for every monitor you are testing on. Is very annoying and a waste of time..
The proposal is to add a DEBUG only check and if the input arguments are missing, generate them on the fly.

Gotcha. Agreed

We can remove from the input arguments the Monitor handle since it's not used in the editor.

For the editor v2, the position argument should be optional, since it will have visibility of all monitors regardless on which monitor it will startup.
The working are of the each monitor will also be obtained by the editor and not passed as an input argument.
Some of this changes can be made already.

https://github.com/microsoft/PowerToys/pull/4022 is a first step in the right direction, more changes are needed to complete this task, since the editor still requires some parameters from the FZ engine.

We just released 0.20 and this should be resolved there.  Please try it out.

authors: crutkas enricogior


text:
Switching Zones With Hot Keys Broken After Fresh Install

Microsoft PowerToys version
0.47.0
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
After a fresh install of Windows 10 and FancyZones 0.47, the ability to resize windows using the shortcut keys does not work.
Install PowerToys on a fresh Windows 10 virtual machine.
✔ Expected Behavior
Zone should switch to the one selected by hot key.
❌ Actual Behavior
When pressing any key, the current zone layout briefly flashes on the screen but it doesn't change to the one selected. If I turn off “flash zones during layout change” in the settings, then nothing visible happens at all. The settings option for shortcut keys is turned on.
I tried to delete the “%LOCALAPPDATA%\Microsoft\PowerToys\FancyZones\” directory to reset the configuration, but the issue persists. Log file is attached. Thanks.
PowerToysReport_2021-10-11-01-20-18.zip
Other Software
No response

Nevermind, fixed after rebooting

source: gharchive/issue

repo: microsoft/PowerToys

license: MIT

license_type: permissive

license_source: github-api


text:
I hava installed powertoy 15.01，but i did not see the launcher and the keyboard manager specs on setting page.

I can see other specs ,but the new features specs don't display.
Environment
Windows build number: 1909[run "ver" at a command prompt]
PowerToys version: 15.01
PowerToy module for which you are reporting the bug (if applicable):

Steps to reproduce

Expected behavior

Actual behavior

Screenshots

those were added in .18 release

authors: crutkas fish-rain


text:
Error: Bad Image - when attempting to open settings

Microsoft PowerToys version
0.51.1
Running as admin

[ ] Yes

Area(s) with issue?
Settings
Steps to reproduce

Install PowerToys on Windows 11
Open Powertoys settings

✔ Expected Behavior
The settings window opens
❌ Actual Behavior

This error
Other Software
No response

I don't THINK I was running as admin, and am unable to open settings to flag that option now.
Windows 11 is regular retail release, not insider.

@pitta, i'd try reinstalling .NET Core 3.1 runtime.  That looks to be what that error says.  Here is 3.1.22 direct installer link.
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-3.1.22-windows-x64-installer

Installed .Net Core 3.1 manually
Error went away
Still no UI when I try to pull up settings

Will need a bug report then.
/reportbug

PowerToysReport_2021-12-29-11-13-34.zip
here ya go!

I've just tried each version back to 0.47.1 which I know used to work, and doesn't now. The global functionality works, but am unable to open the configuration to change any behavior, nor the fancy zones editor (which is how I realized it was broken initially).

I just installed todays release - same issue. Just get no response and no window when i try to open settings. So I'm still unable to make any changes to how it behaves on my system now, including change the FancyZones setup.

PowerToysReport_2022-01-06-11-43-02.zip
Here is the bug report from the latest build, 0.53.1

Pitta,

PowerToys run works for you?
For a sanity check, you're on a x64 device, not on a surface pro X / ARM64 device?
Does PowerRename work for you?

@jaimecbernardo this looks close but not exact.  https://github.com/microsoft/PowerToys/issues/8549

Actually, that dialog is from ColorPicker, why would color picker be throwing an error opening up settings?

every time we see something like this, it is proc architecture differences.

I dont know the hotkey and cant open settings to look it up
I'm on an x64 device. AMD Ryzen 7 5800x
I dont think i had power rename enabled, and cant enable it

The file mentioned could have been corrupted,
Some weird errors do appear in "PowerToys Run\LogsModuleInterface\launcher-log_2021-12-17.txt":
[2021-12-17 14:05:45.876881] [p-10064] [t-10068] [warning] Failed to find the window. Incorrect function.
[2021-12-17 14:05:45.876984] [p-10064] [t-10068] [warning] RunNonElevatedEx() failed. Trying fallback
[2021-12-17 14:05:45.876990] [p-10064] [t-10068] [warning] GetShellWindow() returned null. Shell window is not available
[2021-12-17 14:05:45.876991] [p-10064] [t-10068] [warning] Failed to start PowerToys Run

Last day we have logs for actual PowerToys Run was on 2021-12-16, in "PowerToys Run\Logs\0.51.1.0". There seem to be some interesting errors in some of those logs:
[2021-12-15 22:49:32.3577] [ERROR] [S:\src\modules\launcher\Wox.Infrastructure\Storage\ListRepository`1.cs::54]
Item Already Exists <Advanced Network Configuration (Ubuntu).lnk>

[2021-12-15 22:49:38.3764] [ERROR] [S:\src\modules\launcher\Wox.Infrastructure\Storage\ListRepository`1.cs::54]
Item Already Exists <Emacs (Ubuntu).lnk>

[2021-12-15 22:49:44.3886] [ERROR] [S:\src\modules\launcher\Wox.Infrastructure\Storage\ListRepository`1.cs::54]
Item Already Exists <Language Support (Ubuntu).lnk>

[2021-12-15 22:49:50.4263] [ERROR] [S:\src\modules\launcher\Wox.Infrastructure\Storage\ListRepository`1.cs::54]
Item Already Exists <Printers (Ubuntu).lnk>

[2021-12-15 22:49:56.4704] [ERROR] [S:\src\modules\launcher\Wox.Infrastructure\Storage\ListRepository`1.cs::54]
Item Already Exists <IBus Preferences (Ubuntu).lnk>

Might this be some weird WSL scenario? Those errors were there on previous days so they seem unrelated.
Regarding ColorPicker, we added some logs, and the module interface reports having started the ColorPicker process (ColorPicker\ModuleInterface\Logs\v0.53.1):
[2022-01-06 11:41:29.831277] [p-18872] [t-12260] [info] ColorPicker logger is initialized
[2022-01-06 11:41:30.079281] [p-18872] [t-12260] [trace] ColorPicker::enable()
[2022-01-06 11:41:30.079290] [p-18872] [t-12260] [trace] Starting ColorPicker process
[2022-01-06 11:41:30.108007] [p-18872] [t-12260] [trace] Successfully started the Color Picker process

But then on actual Color Picker Logs we have nothing past 2021-12-05 ( "ColorPicker\Logs" ).
PowerRename is enabled in your settings, according to the Bug Report, so you should be able to see it while right clicking some file / directory.
Could you please start PowerToys and check which PowerToys processes you have running in Task Manager? These would have the "PowerToys." prefix:

When you try to open Settings/ start PowerToys, can you check if you get any error in the Windows Logs on Event Viewer? (Application / System)

This is what I have running in task manager after a reboot with regard to PowerToys

I get no new entries in event viewer with the current timestamp when I try to open settings. Setting still not popping up

Also - yes, I do use WSL daily. Unsure how that would effect PowerToys.

For giggles today i uninstalled PowerToys, windows update, rebooted, and reinstalled PowerToys.
Still in the same boat. Can't open, view, or change settings.

PowerToysReport_2022-01-24-11-09-55.zip
Todays report, for good measure

Did a quick call. Turns out Microsoft.WindowsDesktop.App.runtimeconfig.json was corrupt.
Updating the json to known working unblocked.
{  "runtimeOptions": {    "tfm": "netcoreapp3.1",    "framework": {      "name": "Microsoft.NETCore.App",      "version": "3.1.22",      "rollForward": "LatestPatch"    }  }}
now to see why / how we can prevent others from this.  This is an external failure to powertoys itself but we may be able to catch it.

Turns out, even viewer showed a json parsing error on the file "C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.1.22\Microsoft.WindowsDesktop.App.runtimeconfig.json". Opening that file showed it was corrupted (null for days). Replacing the contents with:
{
  "runtimeOptions": {
    "tfm": "netcoreapp3.1",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "3.1.22",
      "rollForward": "LatestPatch"
    }
  }
}

seems to have solved the problems I was having across the board with PowerToys behavior. Anyone suffering the same fate may want to try looking into this. Be mindful of the .Net version - use the one that is appropriate for your system.
Thank you for the quick chat and help, @crutkas !

authors: Pitta crutkas jaimecbernardo


text:
Auto hide mouse cursor

Description of the new feature / enhancement
A tool when toggled ON will make the mouse cursor hide during typing. I understand it is a built-in windows pointer options but that doesn't work for all the applications.
Scenario when this would be used?
I frequently need to correct code or rephrase my sentences. I click on the line to start typing but when I want to see what I typed, the cursor gets in the way. This is a lot annoying, especially when I'm using a small, 13-inch laptop screen.
There are third-party applications that do the same job but I'm skeptical to install from unknown third-party websites. I believe this would be a good addition to power toys since power toys is all about that extra utility to improve the quality of life for power users.
Supporting information
No response

/dup #11566


text:
[VCM] Mic get's enabled on disabling the vcm module

@crutkas , @yuyoyuppe
VCM still enables mic when I disable the module. (When exiting PowerToys this is fixed!)
Originally posted by @htcfreek in https://github.com/microsoft/PowerToys/issues/15310#issuecomment-1028386990

just to double-check that we indeed need to fix it @jaimecbernardo

I guess it's one of these where some people expect one behavior and other people expect the other behavior.
Still, doing nothing might make sense here if we do nothing on exit as well.

If it is low cost for 56 lets add it in. Agree with we should do the behavior or nothing.

Behavior of nothing. Sorry, got autocorrected

This is fixed with 0.561.  Please head over to https://aka.ms/installpowertoys

authors: crutkas htcfreek jaimecbernardo yuyoyuppe


text:
Acrylic transparency for any window

Description of the new feature / enhancement
We have a very cool Fluent Acrylic effect on windows 10/11, but what if we could set our own transparency level for any window.
Scenario when this would be used?
In any window, we pressing a hotkey, and window transparency change.
Supporting information
Your cool application can set transparency to window, when we move the window with mice. Please add possibility of use this effect permanently! Sorry for my bad english (I am from Ukraine).

/dup #1084

authors: RootZoneRZ crutkas


text:
Something Went Wrong

Microsoft PowerToys version
0.59.1.0
Running as admin

[X] Yes

Area(s) with issue?
General
Steps to reproduce
Whenever I start my computer or PowerToys I get an error. Just started 2 - 3 days ago.
✔ Expected Behavior
No error message
❌ Actual Behavior
I get this:
Version: 0.59.1.0
OS Version: Microsoft Windows NT 10.0.19043.0
IntPtr Length: 8
x64: True
Date: 6/22/2022 3:36:58 PM
Exception:
System.IO.FileNotFoundException: Could not find file 'C:\Program Files\PowerToys\modules\launcher\Images\app.dark.png'.
File name: 'C:\Program Files\PowerToys\modules\launcher\Images\app.dark.png'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
at System.Windows.Media.Imaging.BitmapImage.EndInit()
at System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)
at Wox.Infrastructure.Image.ImageLoader.Initialize(Theme theme)
at PowerLauncher.App.<>c__DisplayClass14_0.b__0()
at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
2022-06-22.txt
Other Software
No response

This might be caused by some older files not being uninstalled correctly.
Would you mind:
1 - Uninstall PowerToys.
2 - See if the PowerToys install directory (default: C:\Program Files\PowerToys) is still there. If it is, delete it manually.
3 - Install PowerToys.
Please let us know if this works for you.
/needinfo

Jaime (and team),
Sorry for the delayed reply. Removing and reinstalling seems to have done the trick.
Thanks for the help (and for the great tool set)!
Neil

From: msftbot[bot] @.>
Sent: Wednesday, June 29, 2022 7:03 AM
To: microsoft/PowerToys @.>
Cc: neilghickey @.>; Author @.>
Subject: Re: [microsoft/PowerToys] Something Went Wrong (Issue #18994)
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.
—
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FPowerToys%2Fissues%2F18994%23issuecomment-1170022076&data=05|01||02cdd03e87534d4064cb08da59d81bc8|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637921081967553936|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=0SBXWrxCeZHncZuVYthE%2BazFqmTAPPb1eibTwVOcAP4%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAZYHPNH76SJJ57ONQXQ6SH3VRRJSDANCNFSM5ZSC4OLA&data=05|01||02cdd03e87534d4064cb08da59d81bc8|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637921081967553936|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=F0xeQgX5QNQIw0hFlHoA0K7kZ4dIaML9eKbIqjZYqcI%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.***>

authors: jaimecbernardo neilghickey


text:
Fancyzone does not keep setting when monitor goes to sleep

Microsoft PowerToys version
0.62.1
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce
Current Setup.
PC is NUC12WSHi7 with 64Gig Ram and 1Tb disk space
1 x Monitor - C49RG90 Samsung 49 Inch (connected via a brand new HDMI cable).
1 x Monitor - Dell 2412m (connected via DVI to HDMI).
I have created 2 x Fancy zones one for my main 49 inch monitor and one for my 24 Inch monitor.

Create the Zones
Snapped windows to the zones
Locked the screen
Monitor goes to sleep

✔ Expected Behavior
When i move the mouse and log back in to windows. I should be able to have all my windows snapped where i left them.
❌ Actual Behavior
All my windows appears to move to Display 1 with them reverting back to the original size.
Troubleshooting -
Uninstalled and reinstalled PowerToys but this has not helped.
Other Software
None that i am aware of which can have an impact on this behaviour.

I have some update on this. But not sure how to reproduce this however one thing i can reproduce.

set both display up accordingly to above screens shot.

Display one has from Left to right - Tidal - Opera Browser- Telegram - Whatsapp (bottom Right).
Display 2 has "Outlook" full screen.

Now locking the screen and wait for both screens to go into sleep mode

Result:
Log back in again and you will see that Outlook have moved from Display 2 to Display and now running in Full screen mode and Tidal have gone back to its original estate.
I hope this helps.
PS: if the screen stay off for long period time...all windows do move around and nothing is attached where it was originally snapped.

I have the exact same issue - sleep with clear any settings. Let me know if I can help.

Is the problem reproducible in 0.65? Thanks!
/needinfo

Dear @SeraphimaZykova
I am now on version 0.65 and can confirm that the issue does happen on Windows 10.
Device name	Feejus-NUC12
Processor	12th Gen Intel(R) Core(TM) i7-1260P   2.10 GHz
Installed RAM	64.0 GB (63.6 GB usable)
System type	64-bit operating system, x64-based processor
Edition	Windows 10 Enterprise
Version	22H2
Installed on	11/09/2022
OS build	19045.2364
Experience	Windows Feature Experience Pack 120.2212.4190.0
I hope this helps.

@Feejus, thank you for your answer. Can you please also attach a /bugreport, so I can take a look at the logs?

As per instruction here is the debug file.
PowerToysReport_2022-12-19-14-24-40.zip

Hi there!We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!

Do you also need me to reproduce this issue before running "Report Bug"?
Thanx

Do you also need me to reproduce this issue before running "Report Bug"?

Yes, please, that would be helpful :)

Hi, Ok This is important so you know where to look or at least what time. I opened 4 windows and snapped them into the
big 49-inch screen at 15:54 GMT (3:54 PM). and Outlook ran on the Dell 24-inch screen in fullscreen.
I also had 2 x PowerPoint presentations that were open and they moved to the left however they were not snapped to any area. Next, I locked the screen and within 1 min the screen was turned off based on the setting in Windows. 15:56 I got back in and ran the debug!

PowerToysReport_2022-12-19-15-57-15.zip

PowerToysReport_2022-12-19-15-57-15.zip

I ran the debug 15:56-15:57.

Thank you very much! I'll look into it.

@SeraphimaZykova is this issue still active? Looks to be over a year old.

I would say this is fixed. I have not seen the issue and I have reinstalled Windows 11 since. From my perspective, this can be closed.

Closing as fixed. Thanks!

authors: Feejus SeraphimaZykova jeppebm plante-msft


text:
Quick Accent do not supprot all Chinese Pinyin characters

Description of the new feature / enhancement
In Chinese pinyin, there are 4 types of marks above a letter. For example,  ōóǒò are four characters, which has different marks over the letter o. However, in Quick Accent, only ōóò are incuded, whith ǒ missing. I hope all these characters can be included in the app.
Scenario when this would be used?
In China, teachers and students, especially those in primary school, need to input these characters from time to time.
By including such characters, users will not have to install other programs to input these things.
Supporting information
Other languages have similar needs. Thus, the app had better consider more languages or needs in different countries or regions.

Other things not included are ǖǘǚǜ, which had better be included in v+SPACE, which is easy to be understood by all Chinese pinyin users.

/dup #22729


text:
Choose which shortcuts shown in quick access

Description of the new feature / enhancement
To choose which shortcuts are shown in the window that opens when PowerToys gets opened through the taskbar.

Scenario when this would be used?
It's easier to open/see the shortcut.
Yours faithfully,
Tesletix :)
Supporting information
No response

/dup of #19541

Following the trail back to the very start (several messages) says closed.   Closed means, nice to have, but no? ... finished and working?  ...  under developement?

/dup of #19541

How is this a duplicate issue? The quick access popup you get when clicking the PowerToys icon on the taskbar is not the same as opening the Shortcut Guide module, or am I misunderstanding something here?
Would be nice to be able to choose which apps are visible in that quick access popup

Ah my apologies, I must have misread the other issue. I'll reopen this one, thanks for bringing it to my attention!

It would seem obvious that the user should be able to determine what items should be included in the quick access menu. When will this feature become available?

/dup https://github.com/microsoft/PowerToys/issues/24283

authors: IlyaDin Tesletix cinnamon-msft crutkas furyzenblade ulengr


text:
Add Quick Accent

Description of the new feature / enhancement
When I click h and want to output Ḥ and ḥ,  I found nothing, but they are useful in romanization of Arabic and Syriac.
by the way I hope that after pressing letter key and left/right/space key, there are digitals showed under each letter with Accent, just like many Chinese or Japanese IME do.
Scenario when this would be used?
When I press h with left/right/space key
Supporting information
No response

can you verify if this is still an issue with v0.74.1 /needinfo

authors: Adenopoda TheJoeFin


text:
Image resizer - no right click menu context

Microsoft PowerToys version
0.73.0
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
Image Resizer
Steps to reproduce
Have been updating Powertgoys for months.  Not used Image Resizer.  Went to right-click a JPG file and no resize image was available.
Others clearly have the same issue and mention reverting to old context menu files.  Not something I want to do for one extra option.
✔ Expected Behavior
No response
❌ Actual Behavior

Other Software
No response

UPDATE>
I have restarted the PC 3 times and on the third occasion, the option appeared.
Thank you - hope this may help others.
I'm running the Latest Win11 Pro updates etc.

/dup https://github.com/microsoft/PowerToys/issues/27622

authors: SPKSAP cinnamon-msft


text:
"Desktop window manager" spends a lot of CPU time when the "Mouse Pointer Crosshairs" is on.

Microsoft PowerToys version
0.77.0
Installation method
PowerToys auto-update
Running as admin
None
Area(s) with issue?
Mouse Utilities
Steps to reproduce
Switch on the Mouse Pointer Crosshairs.
✔ Expected Behavior
The Lines became visible.
❌ Actual Behavior
But the "desktop window manager" spends a lot of CPU time.
Other Software
No response

/bugreport

authors: NikolaBaranov TheJoeFin


text:
Intergration with Windows Terminal

HI All
as Windows Terminal reached stable version i would like to propose intergration of commands in Launcher with Windows Terminal. For example:
wt ping github.com
or
wt ssh 192.168.0.1
Thank you.

@4k3or3et great feedback! You can currently do > wt ping github.com and it will run Windows Terminal with the command. If you have any other integration ideas between PowerToys Run and Windows Terminal, we'd love to hear it!

What about adding the option to change the default shell which is used via ">" in settings?

Yes, highly doubt we'll have it in v1 but this is something that we have planned per the launcher spec:

In PowerToys General Settings:

[Dropdown] Default shell.
[Dropdown] Default terminal.

with 0.19, we can do "wt" and you can do "> wt ping github.com" but you can't currently do "wt ping github.com"  I just created #4497 to enable this.

authors: 4k3or3et crutkas jyuwono olovsson


text:
Export confiuration

Description of the new feature / enhancement
Export the configuration of my own PowerToys, so that i can import it into another computer
Scenario when this would be used?
As the user, i have multiple computers in both my home and company, and I want to sync up configurations in both computers. Since the web-based sync up costs much in the storage, wish the configuration of one computer could be exported so that i can bring the configuration and import it into other computers
Supporting information
No response

Built into PowerToys.
https://learn.microsoft.com/en-us/windows/powertoys/general#backup--restore

You can use the PowerToys DSC resource to grab the file too.

/helped

authors: crutkas htcfreek ricardoisdebugging


text:
Switch case on highlighted text

Description of the new feature / enhancement
Let us set a setup a hotkey to swap highlighted text between the cases, so uppercase and lowercase.
Scenario when this would be used?
This would be useful when writing something in caps by accident, so you dont have to retype everything, or the other way around.
Supporting information
No response

/dup https://github.com/microsoft/PowerToys/issues/907

authors: CuzSai crutkas


text:
[Settings / OOBE] Upgrade to WinUI 2.6

📝 Provide a description of the new feature
Just to keep track of it:
Upgrade to WinUI 2.6 for settings: this version contains a lot of visual updates to the default WinUI controls addressing multiple accessibility issues and to be in line with other Fluent toolkits. It should roll out in the coming weeks / months.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Hoping winUI 3 will be finished soon though :) The roadmap says 2021, but unfortunately not which month.

@niels9001  The OOBE will be out of place compared to those WPF UIs which match inbox Xaml and WinUI 2.5 - so maybe you want to consider sticking with the WinUI_2dot5 visual look, if you upgrade to 2.6 until other things can match?

We're viewing this as 'blocked' until their release?  correct?

@crutkas I put in Blocked because WinUI 2.6 is not yet stable, with missing styles here and there. Preview packages are out, but we shouldn't migrate (yet). @mdtauk makes another good point that ModernWPF is not yet adopting any of the new styles to be included in 2.6.
This is not related to WinUI 3.

Newb q, can I see an example of the difference

Newb q, can I see an example of the difference

An example of some of the new Visual Styles

I don't think the diff between the two systems will be drastically different.  Us holding back on upgrading WinUI as well as bug fix impact as well from that team.

Settings is the only spot that uses WinUI.  I think everything is independent enough where the small diffs won't be blaring

Fixed in #12470 and will be integrated in the next major release of PowerToys

Resolved with the release of v0.45.

authors: Aaron-Junker Jay-o-Way crutkas dedavis6797 mdtauk niels9001


text:
MakePri.exe is fragile and has chance to fail for certain xaml

Describe the bug
When investigating https://github.com/microsoft/microsoft-ui-xaml/issues/3672, I'm trying to narrow the problem, but I cannot even get a minimal repro. After a lot of tries, I realized that MakePri is very fragile and can produce different result during continious run.
Steps to reproduce the bug
Use the reproduction solution in attachment.
Reunion0.5P.zip

Always run git clean -xdf with the solution unloaded in Visual Studio, to clean intermediate files. These files can influence the result.
Open the solution, switch to Release/x64, right click the WinExe project and invoke 'Build`.
Right click the wapproj to open it in developer PowerShell
Invoke msbuild /t:Rebuild /p:Configuration=Release for several times. It can success for the first invocation and then fails for subsequent ones.

I'm getting 6 failures among 27 runs for such simple repro.
The issue only reproduces for Release. For 19041 SDK, the error message is 'PRI222: unspecified error occurs'. For 18362 SDK, the error message says duplicate entry for 'File/xxx/xxx.xbf'.
It seems that use of Windows Community Toolkit, x:Uid and x:Bind contributes to the fail rate. I was modifying ClassLibrary1/UserControl1 to observe it.
When the project grows, the failure rate comes very high. However, if it success for 2 runs, then it will likely to success for subsequent runs (without git clean).
Now I'm really unable to investigate myself for such a random issue.
Version Info

NuGet package version:
[Microsoft.ProjectReunion 0.5.0-prerelease]

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

May 2020 Update (19041)
Yes

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

Additional context

This is not a makepri issue. The error is due to content mismatch between UserControl1.xbf coming from the class library and from the app. XAML compiler will add "x:ConnectionId='2'" to UserControl1.xaml. However, various copies of UserControl1.xbf behave differently. Some contains that ConnectionId, the others don't. If you get unlucky and mismatch ones built into component PRI files, when makepri tries to merge them together, you will get that build error. So this is a XAML build issue.
Not sure what would be a workaround. It seems only building in VS builds fine for me.

@andrewleader can you move this to the XAML repo?

authors: axelandrejs huichen123 huoyaoyuan

repo: microsoft/ProjectReunion


text:
Update to Jupyter Core 1.3.

This PR updates the dependency from the Microsoft.Quantum.Katas package to Microsoft.Jupyter.Core to version 1.3, and uses new functionality in that version to provide extended documentation about the %kata and %check_kata magic commands.

Could you please clarify 1) when does this change take effect? (I'm assuming with the next release?) and 2) what does the effect of this change look like? I'm not sure how the documentation for magic commands can be accessed.

Could you please clarify 1) when does this change take effect? (I'm assuming with the next release?) …

This was the content of https://github.com/microsoft/iqsharp/pull/113 and https://github.com/microsoft/iqsharp/pull/114, and should hopefully be a minor enhancement for the next release of IQ#, yes.

…and 2) what does the effect of this change look like? I'm not sure how the documentation for magic commands can be accessed.

Since IQ# 0.5, ? commands can be used to look up documentation on magic commands:

This needs some improvement to make use of the logic in https://github.com/microsoft/iqsharp/pull/114, but in the meantime https://github.com/microsoft/iqsharp/pull/113 generates Markdown documents from each magic symbol as a part of builds; these Markdown files could in principle be added to reference documentation.

Thanks for the review, and my apologies for not providing more context from the start!

source: gharchive/pull-request

authors: cgranade tcNickolas

repo: microsoft/QuantumKatas


text:
[DE DateTimeV2] Ignoring the date in a weekday-date construction

Describe the bug
When a weekday and date appear together, e.g. "Mein nächstes Gehalt ist Dienstag, der 25..", only the weekday is identified as a timex.
To Reproduce
Steps to reproduce the behavior:

Create a DE app with datetimeV2
Test "Mein nächstes Gehalt ist Dienstag, der 25.."
The result will have only one date entity, "XXXX-WXX-2", expanded to the previous Tuesday and the following Tuesday (e.g. "2021-05-11" and "2021-05-18").

Expected behavior
The best result would be a date entity that expands to possible values for Tuesday the 25th, like ES does.
Platform (please complete the following information):

Platform:
Environment: in browser
Version of package: ?

@LionbridgeCSII, can you take a look at this one?

authors: srandal tellarin

repo: microsoft/Recognizers-Text


text:
Lambda variable identifier treated as an unknown identifier

I've an interesting scenario that is driving me nuts:
I have a model that I am registering to RulesEngine via parameter (line) that consists of:
IReadOnlyList<string> Modifiers { get; }
Any expression that accesses this (in a .NET 6 project/solution) is encountering the following:
Exception while parsing expression `line.Modifiers.Any(l => new [] {"25"}.Contains(l))` - Unknown identifier 'l'

Oddly, in a separate solution that generates this expression, I am able to load the above without issue in my integration test project. Taking the same expression over to my other solution, however, yields the above exception when running RulesEngine. Both solutions use the exact same NuGet version of RulesEngine (5.0.3), using the same Workflow serialization/deserialization.
With tinkering, it seems that the specific reference of l that is a problem is on the left-hand side of the lambda, not the .Contains(l) statement.

Root cause has been identified:
I have a (very) complex object called ClaimDto, which has its own implementations. One child object is the ClaimLine, as referenced above:
public interface IClaimLine
{
  [redacted]

  IReadOnlyList<string> Modifiers { get; }

  [redacted]
}

public class ClaimLine : IClaimLine
{
    [redacted]

    //The original property
    public ClaimLineModifiers Modifiers => _modifiers;

    //The interface's property
    IReadOnlyList<string> IClaimLine.Modifiers => _modifiers.Items().Select(c => c.Modifier).ToList();

    [redacted]
}

public class ClaimLineModifiers : GenericImmutableArray<ClaimLineModifier>
{
    [redacted]
}

public class ClaimLineModifier
{
    [redacted]

    public string Modifier {get; set;}

    [redacted]
}

It turns out that the RuleParameter does not take the type of the reference being passed around (IClaim/IClaimLine) into account, but instead uses the object's type when evaluating the rule.
I uncovered this when screwing around with the expression:
Exception while parsing expression `line.Modifiers.ToList().Any(l => new [] {"25"}.Contains(l))` - Methods on type 'GenericImmutableArray`1' are not accessible

what the [expletive]? why is line.Modifiers pinging as GenericImmutableArray??

I also tried by renaming my interface's Modifiers to Modifiers2 and referencing the property there; no such property when evaluating against Modifiers2 if it remained an explicit interface implementation.
I suppose my immediate solution would be to cast my line to IClaimLine inside of my expression.

The reason that Solution A (source of the expression, with tests) worked was because Solution A only had references to the interface and used mock objects to test expressions in RulesEngine locally. Solution B consuming the expressions have the complicated object model, which has conflicting types between the interface's .Modifiers and the class' .Modifiers

i made some changes to my fork which may affect this question

@BardezAnAvatar, I'm having the same issue. I didn't quite get what you eventually did to resolve it. Thank you!

I had to use the casting syntax for DynamicLINQ, to ensure that the objects are evaluated explicitly as interfaces and not the objects that tbey are. So, by casting to an interface, they use the interface properties, not the class properties.

You use the As({var}, {type}) syntax wherever you reference the variable. You could probably create a scoped param at top level  that does this once for you instead, creating a variable CastedVar that gets used instead of line.

authors: BardezAnAvatar asulwer maqduni

repo: microsoft/RulesEngine


text:
fix decrypt params in 4_bgv_basics.cpp

In the final step, it should be decrypted x^8 instead of x^4.  :D

I found another pr had try to fix this tips

repo: microsoft/SEAL


text:
Checkpointing based on other evaluation metrics

🚀 Feature
Generalize the evaluation/checkpointing behaviour to support checkpointing and "best" performance tracking using other evaluation metrics.
Motivation
Currently the best model is saved based on the validation accuracy. However, in some cases this is not the metric we are most interested in (e.g., in imbalanced settings we might prefer to maximize the balanced accuracy instead).
Pitch
Add a configuration parameter (e.g., eval_metric) that defines the metric that should used to keep track of the best model. A set of metrics could be provided to choose from (starting with those that are already tracked, e.g., accuracy, balanced accuracy, precision, etc.). Ideally, this would be implemented in such a way that the set of metrics could be easily added to over time (without requiring many small changes scattered throughout the codebase).
Alternatives
None
Additional context
None

Hi, these would be some exciting features to be added to the package.
If you could open a PR for this that would be very helpful!

Great! I'll work on this when I get a chance.

authors: Hhhhhhao adamtupper

repo: microsoft/Semi-supervised-learning


text:
Why do you replace noise with SPE?

Compared with Stylegan2,  I notice that you you replace noise with SPE at the same place. What are the differences between SPE and noise? Can SPE achieve the effect of noise? Seems like SPE is a fixed vector?
Thanks.

Thanks for your interest of our work. Note that we do not replace noise injection with SPE. To purely measure the performance of the generator backbone, we remove noise injection in all experiments. The zero padding of convolution could provide model absolution pixel position when generating, which is missing in transformers. So we add SPE to provide absolution global position for transformer generator.

Thanks for your reply. It seems that adding noise will improve the performance in StyleGAN1. How much performance gain have you tried with StyleSwin by adding noise?

In experiments, we have observed that simply adding noise would not result in significant performance improvement. We hypothesis that the noise input may take effect with specific architecture or components (like anti-aliasing upsampling, which we do not use in the StyleSwin), further improvement of the transformer generator is under exploration.

repo: microsoft/StyleSwin


text:
Improve startingDirectory functionality

This commit adds the startingDirectory property to the default-created
cmd and powershell profiles, with the default value
%HOMEDRIVE%%HOMEPATH%.
Signed-off-by: Fred Miller fghzxm@outlook.com

Should we use %USERPROFILE% Instead? We’ve already got a constant for it :)
Thanks!

From: fghzxm notifications@github.com
Sent: Wednesday, May 8, 2019 5:15:35 PM
To: microsoft/Terminal
Cc: Subscribed
Subject: [microsoft/Terminal] Improve startingDirectory functionality (#604)
This commit adds the startingDirectory property to the default-created
cmd and powershell profiles, with the default value
%HOMEDRIVE%%HOMEPATH%.
Signed-off-by: Fred Miller fghzxm@outlook.commailto:fghzxm@outlook.com

You can view, comment on, or merge this pull request online at:
https://github.com/microsoft/Terminal/pull/604https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=7w7pWgtmfjc1wwj718uwpj83sY%2FdGTOPwX8ondlNUA8%3D&reserved=0
Commit Summary

Improve startingDirectory functionality

File Changes

M src/cascadia/TerminalApp/CascadiaSettings.cpphttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604%2Ffiles%23diff-0&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=Q%2BETTmhSexKGKE%2BLFzBQEVCz6S2iR2KWTHDN64swVoQ%3D&reserved=0 (3)
M src/cascadia/TerminalApp/Profile.cpphttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604%2Ffiles%23diff-1&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=d3OIC6lYiI7N6rimw6srV2wU2sTy%2BtGW%2BrkxacqEAkU%3D&reserved=0 (5)
M src/cascadia/TerminalApp/Profile.hhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604%2Ffiles%23diff-2&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=PhnzUVRcMJqdN2kIp3nfT16x2itv9CYxMLSoCADafQk%3D&reserved=0 (1)

Patch Links:

https://github.com/microsoft/Terminal/pull/604.patchhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604.patch&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=gc1I7wwXNAd1CgNZ5wi3qpkTJEWWwucX%2Fg%2Bjad9XesM%3D&reserved=0
https://github.com/microsoft/Terminal/pull/604.diffhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604.diff&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=G0rnyywh2FtWBdDSl%2FkJGC4UkG6O%2FC7lgD6WC1hm94E%3D&reserved=0

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=7w7pWgtmfjc1wwj718uwpj83sY%2FdGTOPwX8ondlNUA8%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADNHLGWGKKVZQRIFCRXT75DPUNUKPANCNFSM4HLWET6Q&data=01|01|duhowett%40microsoft.com|43d9945045a94a31cd5908d6d4137513|72f988bf86f141af91ab2d7cd011db47|1&sdata=gfxbJyrGXx2JiBHtKkodJERt0%2BYkQafXiiZsdpfu%2BG4%3D&reserved=0.

@DHowett-MSFT I inspected the lnks to cmd.exe and powershell.exe in my Start Menu, and they all have %HOMEDRIVE%%HOMEPATH% as their starting directories.  I wanted to match that behavior as strictly as possible.

@DHowett-MSFT I inspected the lnks to cmd.exe and powershell.exe in my Start Menu, and they all have %HOMEDRIVE%%HOMEPATH% as their starting directories. I wanted to match that behavior as strictly as possible.

Correct:

The notes on the SO post suggest that perhaps USERPROFILE is safer? userenv is way earlier than explorer, and I’d almost certainly trust it more :)

From: Shawn Walker-Salas notifications@github.com
Sent: Wednesday, May 8, 2019 6:23:18 PM
To: microsoft/Terminal
Cc: Dustin Howett; Mention
Subject: Re: [microsoft/Terminal] Improve startingDirectory functionality (#604)
@DHowett-MSFThttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FDHowett-MSFT&data=01|01|duhowett%40microsoft.com|79fd540bbe2442f95be508d6d41ceb11|72f988bf86f141af91ab2d7cd011db47|1&sdata=hXR9kXo6P8HnyC1SbULDs4m82XkGZxOPFpwRruc%2BWeE%3D&reserved=0 I inspected the lnks to cmd.exe and powershell.exe in my Start Menu, and they all have %HOMEDRIVE%%HOMEPATH% as their starting directories. I wanted to match that behavior as strictly as possible.
Correct:
[image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F541114%2F57420853-42cd8180-71be-11e9-9f6f-84a8cdc8927e.png&data=01|01|duhowett%40microsoft.com|79fd540bbe2442f95be508d6d41ceb11|72f988bf86f141af91ab2d7cd011db47|1&sdata=pWnJHOVhFkCzbiqJzcntIfry8JUfT4D%2BX1QyOErUtKA%3D&reserved=0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fpull%2F604%23issuecomment-490707828&data=01|01|duhowett%40microsoft.com|79fd540bbe2442f95be508d6d41ceb11|72f988bf86f141af91ab2d7cd011db47|1&sdata=45V6i0HWg80tRwjJ0FZLXDKt%2BIrSTKwy%2BenXIL8otok%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADNHLGUBDR6NZYNFEFBDSKTPUN4INANCNFSM4HLWET6Q&data=01|01|duhowett%40microsoft.com|79fd540bbe2442f95be508d6d41ceb11|72f988bf86f141af91ab2d7cd011db47|1&sdata=eoFKlgE7qsUu0m3Ip1sRe1BuRhlzF0Llc4kDy5vqQ2w%3D&reserved=0.

BTW, should we use %SystemRoot%\system32\cmd.exe and %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe instead of simply cmd.exe and powershell.exe?  (I guess we'll want path qualification if we want to have seperate 64-bit and 32-bit PowerShell profiles.)

BTW, should we use %SystemRoot%\system32\cmd.exe and %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe instead of simply cmd.exe and powershell.exe? (I guess we'll want path qualification if we want to have seperate 64-bit and 32-bit PowerShell profiles.)

Ah, almost certainly. I'm on the fence about pwsh.exe (for the powershell core installation), because I imagine that people put the right one on their %PATH%... what do you think?

I'm on the fence about pwsh.exe (for the powershell core installation), because I imagine that people put the right one on their %PATH%... what do you think?

@DHowett-MSFT But PowerShell Core isn't shipped with Windows, so I guess we actually don't want a PowerShell Core profile to be created by default?  (That would definitely be very confusing to users who don't have pwsh installed, wouldn't it)

I'm on the fence about pwsh.exe (for the powershell core installation), because I imagine that people put the right one on their %PATH%... what do you think?

@DHowett-MSFT  Wait, I don't think PowerShell Core is shipped with Windows.

@fghzxm we actually have some code in the terminal already that attempts to detect if powershell core is installed, and uses pwsh instead of powershell if it is :)

authors: DHowett-MSFT binarycrusader fghzxm zadjii-msft

repo: microsoft/Terminal


text:
Update autogen dependency

Should not affect any usage

Tested. Worked.

Hi, when I did pip install trace-opt it installed autogen v0.4 instead of autogen v0.2
 - Installing autogen-agentchat (0.4.0.dev6)

Steps to reproduce:
poetry new
poetry shell
poetry add trace-opt

or
pip install trace-opt

Hi @sameersegal
I wasn't able to reproduce it. I did
conda create -n test-trace python=3.9
conda activate test-trace
pip install trace-opt
pip show autogen-agentchat

and I got
Name: autogen-agentchat
Version: 0.2.38
Summary: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework
Home-page: https://github.com/microsoft/autogen
Author: AutoGen
Author-email: autogen@microsoft.com
License: UNKNOWN
Location: /home/chinganc/miniconda3/envs/test-trace/lib/python3.9/site-packages
Requires: diskcache, docker, flaml, numpy, openai, packaging, pydantic, python-dotenv, termcolor, tiktoken
Required-by: trace-opt

authors: chinganc jackgerrits sameersegal

repo: microsoft/Trace


text:
Add WebAssembly lib

Search Terms
wasm webassembly types lib
Suggestion
In #20062 (locked due to age) it was discussed that WebAssembly was "experimental" and shouldn't be added as a standard lib.  That of course was in Nov 2017.  It really isn't the case anymore.
Use Cases
Using Definitely Typed and @types has certain challenges and limitations.  Where as a lib distributed with the typescript, based on the IDL would ensure it was easier to consume those APIs, similar to the web worker lib.
Checklist
My suggestion meets these guidelines:

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[X] This feature would agree with the rest of TypeScript's Design Goals.

There's package for it, https://www.npmjs.com/package/@types/webassembly-js-api, but it is marked as deprecated.

The @types/webassembly-js-api package doesn't even work anymore. It fails to install with the following error:
error Couldn't find package "webassembly-js-api@*" required by "@types/webassembly-js-api" on the "npm" registry.

So that means it's not currently possible to use WebAssembly with TypeScript (unless you want to write your own declaration files).
I am a part of the Rust WebAssembly Working Group, our goal is to have seamless integration between Rust and the JavaScript ecosystem.
Right now, wasm-bindgen can take Rust code and compile it into .wasm + .js + .d.ts, which allows for seamlessly using Rust code within a JS or TS project.
Except it can't be used in a TS project because of the lack of typings for WebAssembly. We would really like to have seamless support for TS, but this is blocking us.

TypeScript 3.5.1 includes type definitions for WebAssembly. That's why @types/webassembly-js-api was deprecated.
This issue can probably be closed.

@jhenninger That's wonderful news! It's unfortunate that those using older versions of TypeScript (which is 99+% of TS users) have no solution, so it would have been nice if @types/webassembly-js-api could continue to work for a while.

@Pauan Try installing the version before it was deprecated: npm i @types/webassembly-js-api@0.0.3

I wouldn't have put them in dom personally, since it isn't specifically a dom API, but hey ho, at least they are there.
Fixed in f957f39cf3233752430842d6aa83aa0288d971ab

authors: Pauan jhenninger kitsonk trusktr

repo: microsoft/TypeScript


text:
Change in inferred type in 3.6 for function call using generic union instantiated at string literal

TypeScript Version:  3.6.2

Search Terms: regression, string literal, union, 3.6, inference, generic.
Code
type NetworkProtocol = "TCP";
type Input<T> = Promise<T> | T;
function ifUndefined<T>(input:Input<T> | undefined, value: Input<T>): Promise<T> {
    throw new Error();
}
const y = ifUndefined(new Promise<NetworkProtocol>(() => {}), "TCP")
const z: Promise<NetworkProtocol> = y;

Expected behavior:
No error (3.5 and earlier).
Actual behavior:
A type error (3.6.2):
Type 'Promise<string>' is not assignable to type 'Promise<NetworkProtocol>'.
  Type 'string' is not assignable to type 'NetworkProtocol'.

Playground Link: Playground.  The TypeScript Playground doesn't appear to yet use 3.6.2 though so this doesn't repro in the playground.
Note that this example does work as expected - and looks morally "the same":
type NetworkProtocol = "TCP";
function ifUndefined<T>(input:Promise<T> | undefined, value: T): Promise<T> {
    throw new Error();
}
const y = ifUndefined(new Promise<NetworkProtocol>(() => {}), "TCP")
const z: Promise<NetworkProtocol> = y;

Yes, i can confirm there seems to be an issue in 3.6.2, simpler example here:

It shows the wrong type inference

I think this probably has to do with https://github.com/microsoft/TypeScript/issues/33131#issuecomment-526391597 and is therefore a bug.
The example above was a generic function with its argument typed as string | T.  The call site passes in a string, it matches the string part of the union.  The compiler then doesn't bother to infer T.  T therefore defaults to unknown (its constraint), bar's type is instantiated to string | unknown which collapses to simply unknown by subtype reduction.

Yeah, I think it's to do with the changes to naked type parameter inference. @weswigham mind taking a look to confirm before I close this as a duplicate?

@lukehoban Here's a link to a build you can try to see if it fixes the problem:
https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/42167/artifacts?artifactName=tgz&fileId=84FA9BD7390E9AE04ED6006D9E265FBCF309C643377CBBC8CB1CE445229AAB2B02&fileName=/typescript-3.7.0-insiders.20190830.tgz
Some install instructions

(Hi Luke! 👋)
This is an effect of #32460, and I would argue one that is intended. In the call to ifUndefined we make two inferences for T, in the first argument from Promise<NetworkProtocol> to T | Promise<T> | undefined, and in the second argument from string to T | Promise<T>. Previously we'd give lower priority to the second inference because we infer to a naked type parameter in a union, and thus we'd end up inferring NetworkProtocol for T. Now we give equal priority to the inferences (which really is the correct behavior) and we therefore end up with string.
The string literal "TCP" is widened to string in the second argument because there is nothing to indicate that it shouldn't be. It works as intended if you add a const assertion:
const y = ifUndefined(new Promise<NetworkProtocol>(() => {}), "TCP" as const);

authors: ahejlsberg fatcerberus lukehoban sandersn schlundus


text:
Please document compiler APIs

Would it be possible to get some documentation on the compiler APIs?
I am working on some TypeScript tooling, and I am using ts.createSourceFile() to get the AST for a TypeScript source file. However, the tree in SourceFile.statements is missing some information. For example, I need to know the type of an Expression when a PropertyDeclaration only has an initializer but no declared type. I have tried TypeChecker.getContextualType() but it always returns undefined; also the implementation doesn't look right. There are internal methods like TypeChecker.getTypeOfExpression() that look promising, but they are not visible. Also I read some mention of 'bindings', but I haven't found a way to get them.
Another example is type resolution: When I encounter a TypeNode or something similar within the AST, I usually need to know about its declaration: Where does it come from? Is it local? Where is it imported from? Of course I can write that myself with some effort, but surely such logic already exists within the compiler, I just don't know where.

Is there any progress on this? I am currently blocked.

This is a duplicate of #17147 and #896.
@fljmayer use TypeChecker#getTypeAtLocation. Also, if you ask questions on stack overflow under the typescript-compiler-api tag you will probably get an answer. Documenting the compiler API is a large task and it's an unstable API so don't expect this to be done for a few years.

authors: dsherret fljmayer


text:
Adding property to 'import Vue from 'vue'' import makes 'Vue' no longer constructible

TS Template added by @mjbvz
TypeScript Version: 3.9.0-dev.20200427
Search Terms

Vue
constructor
javascript

VSCode Version: 1.44.2
OS Version: Win10

Does this issue occur when all extensions are disabled?: Yes
Intellisense broken after added property.
Steps to Reproduce:
In a test directory :
yarn init -y
yarn add vue

Create a javascript file index.js :
import Vue from 'vue';
Vue.config.productionTip = true;
const vm = new Vue("");

Intellisense work :

Intellisense broken :

A second test with another module (dayjs)
Intellisense work :

Intellisense broken :

A third test with a function constructor in index.js
It always works, test property exists.

The error here is:

authors: deguich mjbvz


text:
Feature: Reject foo as Promise<null> === null 4.3.2

https://www.typescriptlang.org/play?target=8&strict=true#code/IYZwngdgxgBAZgV2gFwJYHsL3egFAShgG8AnAU2QRKwEYBfAKCYBsKZgYBebPfB1ODFwdOomBATNmhIgxjyYUTCHSsAdM3QBzXAHJkAC1QgYx9jABGCLQBpFmACao0mGAHdUU8WQBuZEpZkMMgkCGRqunx0QA
Tested not working as expected in version 4.3.2
My apologies if this is a duplicate.

You forgot to fill out the issue template.

Duplicate of #11920. Search terms used: null compare in:title


text:
Debug failure in TSServer autocomplete

Bug Report
I've noticed that in the devtools-frontend codebase (https://chromium.googlesource.com/devtools/devtools-frontend), autocompletion suggestions work once and then do not work again when typing. I suspected at first it was a problem with my editor (Vim) but I've also been able to recreate the issue in VSCode, and have delved into the logs to find a "Debug Failure" error reported from TSServer.
🔎 Search Terms
autocomplete, no autocomplete entries
🕗 Version & Regression Information
I'm not exactly sure, but I suspect it started happening at some point in TS 4.4.X's lifespan. It's happening currently for me on TS 4.4.3.
This is also occurring on @next, which at the time of writing is 4.5.0-dev.20210923.

This is a crash

To reproduce
(Appreciate this is a lengthy repro but it's clearly something in our project causing the issue).

Pull down the latest devtools-frontend repo
Load up ElementsBreadcrumbs_test.ts in the test/unittest folder (picking this file rather randomly - seems to happen in most files)
Go to line 403, below it start typing leftB. See how the autocomplete suggests leftButton as you'd expect. Accept this suggestion.
(This is where I'm less confident), but keep trying below line 403 now to insert new lines and start typing leftB. At some point (not sure what the exact trigger is) you will see that the autocomplete falls back to just text matches because something has gone wrong in the server:

Looking at the logs from the server, I see:
"Request textDocument/completion failed with message: Error processing request. Debug Failure. Could not find symbol 'newDefaults' by key 'newDefaults' in module \"/usr/local/google/home/jacktfranklin/src/devtools-frontend/front_end/third_party/marked/package/src/defaults\"\nError: Debug Failure. Could not find symbol 'newDefaults' by key 'newDefaults' in module \"/usr/local/google/home/jacktfranklin/src/devtools-frontend/front_end/third_party/marked/package/src/defaults\"\n    at rehydrateCachedInfo (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:124229:66)\n    at Array.map (<anonymous>)\n    at /usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:124177:33\n    at Map.forEach (<anonymous>)\n    at Object.forEach (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:124175:28)\n    at /usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:127920:32\n    at resolvingModuleSpecifiers (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:126505:26)\n    at collectAutoImports (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:127919:17)\n    at getGlobalCompletions (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:127831:17)\n    at tryGetGlobalSymbols (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:127737:25)\n    at getCompletionData (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:127508:22)\n    at Object.getCompletionsAtPosition (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:126570:34)\n    at Object.getCompletionsAtPosition (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:157807:35)\n    at IOSession.Session.getCompletions (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:169269:64)\n    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:168116:61)\n    at /usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:169918:88\n    at IOSession.Session.executeWithRequestId (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:169909:28)\n    at IOSession.Session.executeCommand (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:169918:33)\n    at IOSession.Session.onMessage (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:169944:35)\n    at Interface.<anonymous> (/usr/local/google/home/jacktfranklin/src/devtools-frontend/node_modules/typescript/lib/tsserver.js:172549:31)\n    at Interface.emit (events.js:375:28)\n    at Interface._onLine (readline.js:364:10)\n    at Interface._normalWrite (readline.js:509:12)\n    at Socket.ondata (readline.js:216:10)\n    at Socket.emit (events.js:375:28)\n    at addChunk (internal/streams/readable.js:290:12)\n    at readableAddChunk (internal/streams/readable.js:265:9)\n    at Socket.Readable.push (internal/streams/readable.js:204:10)\n    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)"

Clearly something in third_party/marked is causing problems. Looking at third_party/marked/src/defaults.js, we see:

I then decide that maybe the implicit any is causing issues, so added the explicit any param:
/**
* @param newDefaults {any}
*/
function changeDefaults(newDefaults) {
  module.exports.defaults = newDefaults;
}

But unfortunately it doesn't seem to fix the issue. I'm therefore assuming that something in the oddity of the module.exports.defaults = newDefaults is throwing TSServer off, but that's as far as I can get.
If I can provide any more info or debugging, please let me know!

Forgot to say, if I delete the module.exports.defaults = newDefaults line, autocomplete is back and everything works as expected.

Thanks for the detailed repro! Would you be able to try the version of TypeScript that @typescript-bot packed in #45792 and see if that fixes it?

Thanks for trying it @jackfranklin. An alternate version of that fix has now made it into nightly, but it does sound like maybe the root cause is something different. I can give it a try with the repro instructions you left. Thanks!

authors: andrewbranch jackfranklin


text:
Support decodeURIComponent in import url

Suggestion
🔍 Search Terms
✅ Viability Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
Currently, ts treat import url as path, not url (remove search / hash and decodeURIComponent firstly).
Is it possible to support decodeURIComponent for import url, at least for "moduleResolution": "NodeNext" / "bundler", or url in format with scheme like http://example.com/%3F.js?version or file:./path%25, because that's the standard behaviour of Node.js / browser?
📃 Motivating Example
import './path%25.mjs';// actually expect './path%.mjs', not './path%25.mjs'

💻 Use Cases
import filename including \ % ? #.

Duplicate of #41730

authors: LongTengDao andrewbranch