File tree Expand file tree Collapse file tree
extensions/discord/src/monitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,6 +249,31 @@ describe("deliverDiscordReply", () => {
249249 ) ;
250250 } ) ;
251251
252+ it ( "does not strip ordinary visible labeled lines" , async ( ) => {
253+ const text = [
254+ "Command: restart the gateway" ,
255+ "Search: check recent Discord logs" ,
256+ "Open: the channel status page" ,
257+ "Find: the failing account" ,
258+ ] . join ( "\n" ) ;
259+
260+ await deliverDiscordReply ( {
261+ replies : [ { text } ] ,
262+ target : "channel:101" ,
263+ token : "token" ,
264+ accountId : "default" ,
265+ runtime,
266+ cfg,
267+ textLimit : 2000 ,
268+ } ) ;
269+
270+ expect ( deliverOutboundPayloadsMock ) . toHaveBeenCalledWith (
271+ expect . objectContaining ( {
272+ payloads : [ { text } ] ,
273+ } ) ,
274+ ) ;
275+ } ) ;
276+
252277 it ( "passes resolved Discord formatting options as explicit delivery options" , async ( ) => {
253278 const baseCfg = {
254279 channels : {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-pay
33import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-runtime" ;
44
55const DISCORD_INTERNAL_TRACE_LINE_RE =
6- / ^ (?: > \s * ) ? (?: (?: 📊 | 🛠 ️ | 📖 | 📝 | 🔍 | 🔎 | ⚙ ️ ) \s * ) ? (?: S e s s i o n S t a t u s | E x e c | R e a d | E d i t | W r i t e | P a t c h | S e a r c h | O p e n | C l i c k | F i n d | S c r e e n s h o t | U p d a t e P l a n | T o o l C a l l | T o o l R e s u l t | F u n c t i o n C a l l | S h e l l | C o m m a n d ) \s * : / i;
6+ / ^ (?: > \s * ) ? (?: 📊 | 🛠 ️ | 📖 | 📝 | 🔍 | 🔎 | ⚙ ️ ) \s * (?: S e s s i o n S t a t u s | E x e c | R e a d | E d i t | W r i t e | P a t c h | S e a r c h | O p e n | C l i c k | F i n d | S c r e e n s h o t | U p d a t e P l a n | T o o l C a l l | T o o l R e s u l t | F u n c t i o n C a l l | S h e l l | C o m m a n d ) \s * : / i;
77const DISCORD_INTERNAL_CHANNEL_LINE_RE =
88 / ^ (?: > \s * ) ? (?: a n a l y s i s | c o m m e n t a r y | t o o l [ - _ ] ? c a l l | t o o l [ - _ ] ? r e s u l t | f u n c t i o n [ - _ ] ? c a l l | t h i n k i n g | r e a s o n i n g ) \s * [: = ] / i;
99
You can’t perform that action at this time.
0 commit comments