@chbo297/infoflow 2026.3.8 → 2026.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chbo297/infoflow",
3
- "version": "2026.3.8",
3
+ "version": "2026.3.9",
4
4
  "description": "OpenClaw Infoflow (如流) channel plugin for Baidu enterprise messaging",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/src/bot.ts CHANGED
@@ -103,10 +103,10 @@ function checkWatchMentioned(
103
103
  return undefined;
104
104
  }
105
105
 
106
- /** Check if message content matches the configured watchRegex regex pattern */
106
+ /** Check if message content matches the configured watchRegex regex pattern. Uses "s" (dotAll) so that . matches newlines in multi-line messages. */
107
107
  function checkWatchRegex(mes: string, pattern: string): boolean {
108
108
  try {
109
- return new RegExp(pattern, "i").test(mes);
109
+ return new RegExp(pattern, "is").test(mes);
110
110
  } catch {
111
111
  return false;
112
112
  }
package/src/channel.ts CHANGED
@@ -207,7 +207,7 @@ export const infoflowPlugin: ChannelPlugin<ResolvedInfoflowAccount> = {
207
207
  outbound: {
208
208
  deliveryMode: "direct",
209
209
  chunkerMode: "markdown",
210
- textChunkLimit: 4000,
210
+ textChunkLimit: 2048,
211
211
  chunker: (text, limit) => getInfoflowRuntime().channel.text.chunkText(text, limit),
212
212
  sendText: async ({ cfg, to, text, accountId }) => {
213
213
  logVerbose(`[infoflow:sendText] to=${to}, accountId=${accountId}`);
@@ -148,8 +148,8 @@ export function createInfoflowReplyDispatcher(params: CreateInfoflowReplyDispatc
148
148
  messageText = atPrefix + text;
149
149
  }
150
150
 
151
- // Chunk text to 4000 chars max (Infoflow limit)
152
- const chunks = core.channel.text.chunkText(messageText, 4000);
151
+ // Chunk text to 2048 chars max (Infoflow limit)
152
+ const chunks = core.channel.text.chunkText(messageText, 2048);
153
153
  // Only include @mentions in the first chunk (avoid duplicate @s)
154
154
  let isFirstChunk = true;
155
155