mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 07:20:22 +00:00
feat: add chunking mode option for BlueBubbles (#1645)
* feat: add chunking mode for outbound messages - Introduced `chunkMode` option in various account configurations to allow splitting messages by "length" or "newline". - Updated message processing to handle chunking based on the selected mode. - Added tests for new chunking functionality, ensuring correct behavior for both modes. * feat: enhance chunking mode documentation and configuration - Added `chunkMode` option to the BlueBubbles account configuration, allowing users to choose between "length" and "newline" for message chunking. - Updated documentation to clarify the behavior of the `chunkMode` setting. - Adjusted account merging logic to incorporate the new `chunkMode` configuration. * refactor: simplify chunk mode handling for BlueBubbles - Removed `chunkMode` configuration from various account schemas and types, centralizing chunk mode logic to BlueBubbles only. - Updated `processMessage` to default to "newline" for BlueBubbles chunking. - Adjusted tests to reflect changes in chunk mode handling for BlueBubbles, ensuring proper functionality. * fix: update default chunk mode to 'length' for BlueBubbles - Changed the default value of `chunkMode` from 'newline' to 'length' in the BlueBubbles configuration and related processing functions. - Updated documentation to reflect the new default behavior for chunking messages. - Adjusted tests to ensure the correct default value is returned for BlueBubbles chunk mode.
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { createRequire } from "node:module";
|
||||
|
||||
import { chunkMarkdownText, chunkText, resolveTextChunkLimit } from "../../auto-reply/chunk.js";
|
||||
import {
|
||||
chunkByNewline,
|
||||
chunkMarkdownText,
|
||||
chunkText,
|
||||
chunkTextWithMode,
|
||||
resolveChunkMode,
|
||||
resolveTextChunkLimit,
|
||||
} from "../../auto-reply/chunk.js";
|
||||
import {
|
||||
hasControlCommand,
|
||||
isControlCommandMessage,
|
||||
@@ -160,8 +167,11 @@ export function createPluginRuntime(): PluginRuntime {
|
||||
},
|
||||
channel: {
|
||||
text: {
|
||||
chunkByNewline,
|
||||
chunkMarkdownText,
|
||||
chunkText,
|
||||
chunkTextWithMode,
|
||||
resolveChunkMode,
|
||||
resolveTextChunkLimit,
|
||||
hasControlCommand,
|
||||
resolveMarkdownTableMode,
|
||||
|
||||
Reference in New Issue
Block a user