Skip to content

Adding new DesktopAgent action - CursorTrail #2113

Merged
TalZaccai merged 12 commits intomainfrom
talzacc/first_action
Apr 2, 2026
Merged

Adding new DesktopAgent action - CursorTrail #2113
TalZaccai merged 12 commits intomainfrom
talzacc/first_action

Conversation

@TalZaccai
Copy link
Copy Markdown
Contributor

@TalZaccai TalZaccai commented Mar 31, 2026

Adding a new CursorTrail action that enables/disables the retro Windows mouse cursor trail effect and lets users control its length.

What it does

  • Enables or disables cursor trails via SystemParametersInfo(SPI_SETMOUSETRAILS, ...)
  • Supports an optional length parameter (valid range: 2–12)
  • Shows an informative message if the user provides an out-of-range value

User phrases

  • "enable mouse trail" / "turn on cursor trail"
  • "disable mouse trail" / "turn off cursor trail"
  • "set cursor trail length to 10" / "cursor trail 5"

Grammar test fix

The grammar test script (test-grammar-matching.mjs) was only loading desktopSchema.agr, so test cases
for actions defined in sub-grammars (display, taskbar, input, privacy, etc.) were silently failing with "NO MATCH".
Updated the script to read manifest.json and load all declared sub-grammars automatically. This fixes 28 previously
broken test cases and ensures new sub-grammar actions like CursorTrail are actually validated.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CursorTrailAction to 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@robgruen
Copy link
Copy Markdown
Collaborator

Can we update the readme with this new action please.

Copy link
Copy Markdown
Collaborator

@robgruen robgruen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ it.
See my readme comment.

@robgruen robgruen temporarily deployed to development-fork April 1, 2026 18:35 — with GitHub Actions Inactive
@robgruen robgruen temporarily deployed to development-fork April 1, 2026 21:11 — with GitHub Actions Inactive
@robgruen robgruen temporarily deployed to development-fork April 1, 2026 21:11 — with GitHub Actions Inactive
@TalZaccai TalZaccai added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 6a763b3 Apr 2, 2026
21 checks passed
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

Successfully merging this pull request may close these issues.

3 participants