mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:31:23 +00:00
fix(auto-reply): tighten silent token semantics and prefix streaming
This commit is contained in:
@@ -28,7 +28,12 @@ import {
|
||||
import { stripHeartbeatToken } from "../heartbeat.js";
|
||||
import type { TemplateContext } from "../templating.js";
|
||||
import type { VerboseLevel } from "../thinking.js";
|
||||
import { isSilentReplyPrefixText, isSilentReplyText, SILENT_REPLY_TOKEN } from "../tokens.js";
|
||||
import {
|
||||
HEARTBEAT_TOKEN,
|
||||
isSilentReplyPrefixText,
|
||||
isSilentReplyText,
|
||||
SILENT_REPLY_TOKEN,
|
||||
} from "../tokens.js";
|
||||
import type { GetReplyOptions, ReplyPayload } from "../types.js";
|
||||
import {
|
||||
buildEmbeddedRunBaseParams,
|
||||
@@ -141,6 +146,12 @@ export async function runAgentTurnWithFallback(params: {
|
||||
if (isSilentReplyText(text, SILENT_REPLY_TOKEN)) {
|
||||
return { skip: true };
|
||||
}
|
||||
if (
|
||||
isSilentReplyPrefixText(text, SILENT_REPLY_TOKEN) ||
|
||||
isSilentReplyPrefixText(text, HEARTBEAT_TOKEN)
|
||||
) {
|
||||
return { skip: true };
|
||||
}
|
||||
if (!text) {
|
||||
// Allow media-only payloads (e.g. tool result screenshots) through.
|
||||
if ((payload.mediaUrls?.length ?? 0) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user