Adding new DesktopAgent action - CursorTrail #2113
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Windows DesktopAgent CursorTrail input action that toggles the retro cursor trail effect and optionally sets the trail length, wiring it through the TS grammar/schema layer, the TS connector message payload, and the .NET AutoShell handler that calls SystemParametersInfo(SPI_SETMOUSETRAILS, ...).
Changes:
- Extend the Windows input grammar to recognize cursor-trail enable/disable and “set length” utterances.
- Add a
CursorTrailActionto the TS input action schema and handle it in the TS connector (including clamping/notes for out-of-range lengths). - Add a new .NET AutoShell command handler to apply the setting via
SystemParametersInfo(SPI_SETMOUSETRAILS, ...).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ts/packages/agents/desktop/src/windows/inputSchema.agr | Adds <CursorTrail> grammar rule and routes it to the CursorTrail action. |
| ts/packages/agents/desktop/src/windows/inputActionsSchema.ts | Introduces CursorTrailAction type and includes it in DesktopInputActions. |
| ts/packages/agents/desktop/src/connector.ts | Adds CursorTrail case to serialize parameters + produce a confirmation message (with clamping behavior). |
| dotnet/autoShell/AutoShell.cs | Routes CursorTrail command key to the new settings handler. |
| dotnet/autoShell/AutoShell_Settings.cs | Implements HandleMouseCursorTrail and adds SPI_SETMOUSETRAILS constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ypeAgent into talzacc/first_action
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ypeAgent into talzacc/first_action
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Can we update the readme with this new action please. |
robgruen
left a comment
There was a problem hiding this comment.
❤️ it.
See my readme comment.
Adding a new CursorTrail action that enables/disables the retro Windows mouse cursor trail effect and lets users control its length.
What it does
SystemParametersInfo(SPI_SETMOUSETRAILS, ...)User phrases
Grammar test fix
The grammar test script (
test-grammar-matching.mjs) was only loadingdesktopSchema.agr, so test casesfor actions defined in sub-grammars (display, taskbar, input, privacy, etc.) were silently failing with "NO MATCH".
Updated the script to read
manifest.jsonand load all declared sub-grammars automatically. This fixes 28 previouslybroken test cases and ensures new sub-grammar actions like
CursorTrailare actually validated.