refactor(text): remove unused final tag predicate · openclaw/openclaw@361320c
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -58,7 +58,7 @@ import { resolveProviderThinkingProfile } from "../plugins/provider-runtime.js";
|
58 | 58 | import type { ProviderThinkingModelCompat } from "../plugins/provider-thinking.types.js"; |
59 | 59 | import { DEFAULT_AGENT_ID } from "../routing/session-key.js"; |
60 | 60 | import { stripAssistantInternalScaffolding } from "../shared/text/assistant-visible-text.js"; |
61 | | -import { containsFinalTag, stripFinalTags } from "../shared/text/final-tags.js"; |
| 61 | +import { findFinalTagMatches, stripFinalTags } from "../shared/text/final-tags.js"; |
62 | 62 | import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../utils/message-channel.js"; |
63 | 63 | import { GatewayClient } from "./client.js"; |
64 | 64 | import { |
@@ -598,7 +598,7 @@ function assertNoReasoningTags(params: {
|
598 | 598 | if (!params.text) { |
599 | 599 | return; |
600 | 600 | } |
601 | | -if (THINKING_TAG_RE.test(params.text) || containsFinalTag(params.text)) { |
| 601 | +if (THINKING_TAG_RE.test(params.text) || findFinalTagMatches(params.text).length > 0) { |
602 | 602 | const snippet = params.text.length > 200 ? `${params.text.slice(0, 200)}…` : params.text; |
603 | 603 | throw new Error( |
604 | 604 | `[${params.label}] reasoning tag leak (${params.model} / ${params.phase}): ${snippet}`, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。