Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1928898565
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const blockRegex = /\[\[tts:text\]\]([\s\S]*?)\[\[\/tts:text\]\]/gi; | ||
| const blockRegex = | ||
| /(?:^|\n)[ \t]*\[\[tts:text\]\][ \t]*(?:\n|$)([\s\S]*?)(?:\n|^)[ \t]*\[\[\/tts:text\]\][ \t]*(?=\n|$)/gi; |
There was a problem hiding this comment.
Accept CRLF in standalone TTS directive matching
The new standalone-line regexes only recognize \n boundaries, so directives are silently missed when text uses Windows-style \r\n newlines. In that case parseTtsDirectives leaves hasDirective false and skips provider/text overrides even when directives are on their own lines, which is a regression from the previous parser behavior for the same content with CRLF line endings.
Useful? React with 👍 / 👎.
| // Slack Bolt's default ignoreSelf middleware can suppress reaction | ||
| // events on bot-authored messages (item_user is the bot). Keep it | ||
| // disabled and rely on OpenClaw's explicit message-level filtering. | ||
| ignoreSelf: false, |
There was a problem hiding this comment.
Filter bot reaction events after disabling Bolt ignoreSelf
Setting ignoreSelf: false in socket mode allows the app's own reaction events through, but the reaction handler path does not exclude event.user === ctx.botUserId. When messages.ackReaction is enabled, OpenClaw can process its own ack reactions as inbound reaction events and enqueue extra system-event prompts ("reaction added"), creating noisy or misleading follow-up context in normal channel traffic.
Useful? React with 👍 / 👎.
Motivation
ignoreSelfmiddleware so the app-level filtering is used instead.Description
parseTtsDirectivesinsrc/tts/directives.tsto only match block and[[tts:...]]directives when placed on their own lines, preventing inline examples from being treated as directives.src/plugins/contracts/tts.contract.test.tsto reflect the stricter directive parsing and added a test that inline literal directive examples remain plain text.ignoreSelf: falsein the Slack socket-modeAppoptions inextensions/slack/src/monitor/provider.tsand added a comment explaining the change.extensions/slack/src/monitor.test-helpers.tsto capture the lastAppconstructor options viagetLastSlackAppOptionsso tests can assert socket-mode options, and added a corresponding test inextensions/slack/src/monitor.tool-result.test.tsto verifysocketModeandignoreSelfsettings.BUNDLED_AUTO_ENABLE_PROVIDER_PLUGIN_IDSinto the known plugin ID set insrc/config/validation.tsand added a unit testsrc/config/config.plugin-validation.test.tsto ensure bundled provider auto-enable plugin IDs are treated as known during validation.Testing
socketModeandignoreSelfvia the addedgetLastSlackAppOptionshelper and test, which succeeded.Codex Task