惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
The Cloudflare Blog
S
SegmentFault 最新的问题
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
量子位
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
J
Java Code Geeks
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(auto-reply): suppress reasoning-prefixed NO_REPLY · o...
zuoanCo · 2026-05-27 · via Recent Commits to openclaw:main

@@ -71,11 +71,115 @@ function isSilentReplyEnvelopeText(

7171

}

7272

}

737374+

const taggedReasoningPrefixRe =

75+

/^\s*<\s*(?:(?:antml:)?(?:think(?:ing)?|thought)|antthinking)\b[^<>]*>[\s\S]*?<\s*\/\s*(?:(?:antml:)?(?:think(?:ing)?|thought)|antthinking)\s*>\s*/i;

76+

const openReasoningPrefixRe =

77+

/^\s*<\s*(?:(?:antml:)?(?:think(?:ing)?|thought)|antthinking)\b[^<>]*>/i;

78+

const plainReasoningPrefixRe = /^\s*(?:think(?:ing)?|thought|analysis|reasoning)\s*:?\s*\r?\n/i;

79+80+

function stripLeadingReasoningBlocks(text: string): string {

81+

let current = text;

82+

while (true) {

83+

const next = current.replace(taggedReasoningPrefixRe, "");

84+

if (next === current) {

85+

return current;

86+

}

87+

current = next;

88+

}

89+

}

90+91+

function stripFinalSilentToken(text: string, token: string): string | null {

92+

const escaped = escapeRegExp(token);

93+

const stripped = text.replace(new RegExp(`(?:^|[\\s*.])${escaped}\\s*$`, "i"), "").trim();

94+

return stripped === text.trim() ? null : stripped;

95+

}

96+97+

const silentIntentTextRe =

98+

/^\s*(?:i|i'll|i\s+will|i'm|i\s+am|we|we'll|we\s+will|the\s+assistant|assistant|the\s+bot|bot|openclaw)\s+(?:(?:will\s+)?(?:stay|remain|keep|be)\s+(?:quiet|silent)(?:\s+(?:here|for\s+now|on\s+this|in\s+this\s+(?:chat|thread|channel|conversation)))?|(?:do\s+not|don't|dont|will\s+not|won't|would\s+not|should\s+not)\s+(?:reply|respond)(?:\s+(?:here|for\s+now|on\s+this|in\s+this\s+(?:chat|thread|channel|conversation)))?|(?:have|has)\s+nothing\s+(?:to|for)\s+(?:say|add|reply|respond))(?:[.!?]+)?\s*$/i;

99+100+

function hasSilentIntentFinalSilentToken(text: string, token: string): boolean {

101+

const withoutToken = stripFinalSilentToken(text, token);

102+

if (withoutToken === null) {

103+

return false;

104+

}

105+

return !withoutToken || silentIntentTextRe.test(withoutToken);

106+

}

107+108+

const substantiveAnswerCueRe =

109+

/\b(?:answer|here(?:'s|\s+is)|tell\s+them|you\s+(?:should|can|could|need|must)|please|try|use|send|service\s+is|resolved|retry|yes|no,|sure)\b/i;

110+

const bareReasoningPlaceholderRe =

111+

/^\s*(?:(?:internal|private)\s+)?(?:reasoning|thinking|thoughts?|analysis)(?:\s+notes?)?\s*$/i;

112+113+

function hasPlainReasoningFinalSilentToken(text: string, token: string): boolean {

114+

const withoutToken = stripFinalSilentToken(text, token);

115+

if (withoutToken === null) {

116+

return false;

117+

}

118+

if (!withoutToken || silentIntentTextRe.test(withoutToken)) {

119+

return true;

120+

}

121+

const lines = withoutToken

122+

.split(/\r?\n/)

123+

.map((line) => line.trim())

124+

.filter(Boolean);

125+

const finalLine = lines.at(-1);

126+

const previousLines = lines.slice(0, -1).join("\n");

127+

return (

128+

Boolean(

129+

finalLine &&

130+

silentIntentTextRe.test(finalLine) &&

131+

previousLines &&

132+

!substantiveAnswerCueRe.test(previousLines),

133+

) || bareReasoningPlaceholderRe.test(withoutToken)

134+

);

135+

}

136+137+

function isReasoningPrefixedSilentReplyText(

138+

text: string | undefined,

139+

token: string = SILENT_REPLY_TOKEN,

140+

): boolean {

141+

if (!text) {

142+

return false;

143+

}

144+

const trimmed = text.trim();

145+

if (!trimmed) {

146+

return false;

147+

}

148+149+

const withoutLeadingReasoningBlocks = stripLeadingReasoningBlocks(trimmed);

150+

if (withoutLeadingReasoningBlocks !== trimmed) {

151+

return (

152+

isSilentReplyText(withoutLeadingReasoningBlocks, token) ||

153+

hasSilentIntentFinalSilentToken(withoutLeadingReasoningBlocks, token)

154+

);

155+

}

156+157+

if (openReasoningPrefixRe.test(trimmed)) {

158+

const withoutOpenReasoningPrefix = trimmed.replace(openReasoningPrefixRe, "");

159+

return (

160+

isSilentReplyText(withoutOpenReasoningPrefix, token) ||

161+

hasPlainReasoningFinalSilentToken(withoutOpenReasoningPrefix, token)

162+

);

163+

}

164+

if (!plainReasoningPrefixRe.test(trimmed)) {

165+

return false;

166+

}

167+

const withoutPlainReasoningPrefix = trimmed.replace(plainReasoningPrefixRe, "");

168+

return (

169+

isSilentReplyText(withoutPlainReasoningPrefix, token) ||

170+

hasPlainReasoningFinalSilentToken(withoutPlainReasoningPrefix, token)

171+

);

172+

}

173+74174

export function isSilentReplyPayloadText(

75175

text: string | undefined,

76176

token: string = SILENT_REPLY_TOKEN,

77177

): boolean {

78-

return isSilentReplyText(text, token) || isSilentReplyEnvelopeText(text, token);

178+

return (

179+

isSilentReplyText(text, token) ||

180+

isSilentReplyEnvelopeText(text, token) ||

181+

isReasoningPrefixedSilentReplyText(text, token)

182+

);

79183

}

8018481185

/**