Commit 5b3ae35
fix(naming): set window title when get_current_location claims an unowned console
GetCurrentLocation discarded FindReadyPipeAsync's consoleSwitched
flag with `_`, so when an AI's first tool call after the user's
Import-Module PowerShell.MCP happened to be get_current_location
(rather than invoke_expression / start_console, which both honor the
flag), the proxy claimed the console without ever calling
SetConsoleTitleAsync. The window title was left at the OnImport
placeholder "#PID ____" until some other tool that handles
consoleSwitched ran later — which made the symptom appear
intermittent depending on tool-call ordering.
The fix captures consoleSwitched and routes through SetConsoleTitleAsync
on the same tight path InvokeExpression and StartConsole already use.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 983dcae commit 5b3ae35
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
| |||
0 commit comments