Skip to content

User-defined Actions System - #200

Open
nschimme wants to merge 5 commits into
masterfrom
feature/user-actions-6667877936605571834
Open

User-defined Actions System#200
nschimme wants to merge 5 commits into
masterfrom
feature/user-actions-6667877936605571834

Conversation

@nschimme

Copy link
Copy Markdown
Owner

This change implements a user-defined action system, allowing users to define custom triggers and commands based on MUD output. It leverages the existing action backend but extends it with capture support and a user-facing CLI command. User actions are stored separately in the configuration and evaluated before internal actions.


PR created automatically by Jules for task 6667877936605571834 started by @nschimme

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @nschimme, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

- Added `actions` GroupConfig to Configuration.
- Enhanced action backend to support captures in callbacks.
- Implemented `UserActionManager` to manage user-defined triggers.
- Integrated `UserActionManager` into the parsing pipeline.
- Added `/action` command for managing user actions (add, remove, list).
- Actions support `regex`, `starts`, and `ends` matching types.
- Actions support variable substitution (%0 to %9) for captures.
- Added unit tests for `UserActionManager`.
- Added `actions` GroupConfig to Configuration.
- Enhanced action backend to support captures in callbacks.
- Implemented `UserActionManager` with performance optimizations:
    - Pre-compiled `std::regex` objects.
    - Hint-based indexing (first character) for faster lookups.
    - Minimized string allocations during matching.
- Integrated `UserActionManager` into the parsing pipeline.
- Added a unified `/action` command for managing user actions:
    - `/action` (list active actions).
    - `/action <pattern>` (remove action).
    - `/action [-regex|-starts|-ends] <pattern> <command>` (define action).
- Actions support variable substitution (%0 to %9) for captures.
- Added comprehensive unit tests in `TestUserActionManager`.
- Rebased on master and resolved conflicts with the new Timers panel.
@nschimme
nschimme force-pushed the feature/user-actions-6667877936605571834 branch from 8f94731 to c16a663 Compare April 15, 2026 19:29
@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 301 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (a6c8653) to head (76663e6).

Files with missing lines Patch % Lines
src/client/UserActionManager.cpp 0.00% 139 Missing ⚠️
src/parser/AbstractParser-UserActions.cpp 0.00% 74 Missing ⚠️
src/preferences/configdialog.cpp 0.00% 45 Missing ⚠️
src/parser/Action.cpp 0.00% 15 Missing ⚠️
src/parser/AbstractParser-Actions.cpp 0.00% 12 Missing ⚠️
src/parser/AbstractParser-Commands.cpp 0.00% 12 Missing ⚠️
src/configuration/configuration.cpp 0.00% 2 Missing ⚠️
src/parser/abstractparser.h 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #200       +/-   ##
==========================================
- Coverage   25.40%   0.00%   -25.41%     
==========================================
  Files         519     498       -21     
  Lines       43102   41275     -1827     
  Branches     4698    4711       +13     
==========================================
- Hits        10952       0    -10952     
- Misses      32150   41275     +9125     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Implement a flexible and optimized user-defined action system inspired
by Powwow, JMC, and TinTin++.

- Added UserActionManager to handle action lifecycle and evaluation.
- Supported Regex, StartsWith, and EndsWith action types.
- Implemented capture group support (%0-%9) for variables.
- Optimized matching with first-character hints and pre-compiled regex.
- Unified /action command for listing, defining, and removing actions.
- Stored user actions separately in the actions configuration group.
- Enhanced internal action backend to support capture groups.
- Fixed cross-platform CI issues related to regex template deduction.
- Moved sendToMud to base class for shared access.
Implement a flexible and optimized user-defined action system inspired
by Powwow, JMC, and TinTin++.

- Added UserActionManager to handle action lifecycle and evaluation.
- Supported Regex, StartsWith, and EndsWith action types.
- Implemented capture group support (%0-%9) for variables.
- Optimized matching with first-character hints and pre-compiled regex.
- Unified /action command for listing, defining, and removing actions.
- Stored user actions separately in the actions configuration group.
- Enhanced internal action backend to support capture groups.
- Fixed cross-platform CI issues related to regex template deduction.
- Moved sendToMud to base class for shared access.
- Avoided forbidden QString string conversion functions in favor of mmqt helpers.
- Resolved build conflicts and ensured strict adherence to project standards.
Implement a flexible and optimized user-defined action system inspired
by Powwow, JMC, and TinTin++.

- Added UserActionManager to handle action lifecycle and evaluation.
- Supported Regex, StartsWith, and EndsWith action types.
- Implemented capture group support (%0-%9) for variables.
- Optimized matching with first-character hints and pre-compiled regex.
- Unified /action command for listing, defining, and removing actions.
- Stored user actions separately in the actions configuration group.
- Enhanced internal action backend to support capture groups.
- Fixed cross-platform CI issues related to regex template deduction.
- Moved sendToMud to base class for shared access.
- Added comprehensive help documentation for the action command.
- Avoided forbidden QString string conversion functions.
- Resolved build conflicts and rebased on top of master v26.04.1.
@nschimme
nschimme force-pushed the master branch 2 times, most recently from e8139f3 to c119262 Compare April 20, 2026 18:27
@nschimme
nschimme force-pushed the master branch 3 times, most recently from ae664f2 to bcd8fca Compare May 21, 2026 23:06
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.

1 participant