Files
Innei 101c110474 🐛 fix(desktop): stop crashing the main process when a user folder cannot be resolved (#19598)
* 🐛 fix(desktop): stop crashing the main process when a user folder cannot be resolved

On Windows, app.getPath('pictures') (and music/videos/downloads) throws
when the Known Folder is redirected or missing. The gateway
system_info_request handler called it without a guard, so sending a
message took down the whole app. Resolve those folders through a
tolerant helper, catch handler failures, and drop unresolved paths
before they reach the prompt template so it falls back to
'(not reported)'.

* 🐛 fix(desktop): always answer failed system-info requests and bound the gateway read

A rejected getShellInfo() or an unguarded app.getPath call used to be
logged without a correlated reply, and getDeviceSystemInfo() posted
without a timeout, so the agent run stayed parked for the lifetime of
the socket. Reply with success: false on failure and apply the shared
device-query timeout so the run degrades to unavailable system info.

* ✅ test(desktop): cover a throwing optional folder lookup in the gateway system-info handler
2026-09-16 22:11:12 +08:00
..