mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
refactor(channels): drop unused test helpers
This commit is contained in:
@@ -137,7 +137,6 @@ import {
|
||||
buildTelegramNonInterruptingReplyFenceKey,
|
||||
buildTelegramReplyFenceLaneKey,
|
||||
endTelegramReplyFence,
|
||||
getTelegramReplyFenceSizeForTests,
|
||||
isTelegramReplyFenceSuperseded,
|
||||
releaseTelegramReplyFenceAbortController,
|
||||
resetTelegramReplyFenceForTests,
|
||||
@@ -146,7 +145,7 @@ import {
|
||||
supersedeTelegramReplyFence,
|
||||
} from "./telegram-reply-fence.js";
|
||||
|
||||
export { getTelegramReplyFenceSizeForTests, resetTelegramReplyFenceForTests };
|
||||
export { resetTelegramReplyFenceForTests };
|
||||
|
||||
const EMPTY_RESPONSE_FALLBACK = "No response generated. Please try again.";
|
||||
const silentReplyDispatchLogger = createSubsystemLogger("telegram/silent-reply-dispatch");
|
||||
|
||||
@@ -234,10 +234,6 @@ export function shouldSupersedeTelegramReplyFence(ctxPayload: {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function getTelegramReplyFenceSizeForTests(): number {
|
||||
return telegramReplyFenceByKey.size;
|
||||
}
|
||||
|
||||
export function resetTelegramReplyFenceForTests(): void {
|
||||
telegramReplyFenceByKey.clear();
|
||||
telegramReplyFenceKeysByLane.clear();
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
resolvePairLoopGuardSettings,
|
||||
type PairLoopGuardConfig,
|
||||
type PairLoopGuardResult,
|
||||
type PairLoopGuardSnapshotEntry,
|
||||
} from "../../plugin-sdk/pair-loop-guard-runtime.js";
|
||||
|
||||
/** Facts used to detect repeated bot-to-bot channel reply loops. */
|
||||
@@ -43,8 +42,3 @@ export function recordChannelBotPairLoopAndCheckSuppression(
|
||||
export function clearChannelBotPairLoopGuardForTests(): void {
|
||||
channelBotPairLoopGuard.clear();
|
||||
}
|
||||
|
||||
/** Lists tracked bot-loop pairs for isolated tests. */
|
||||
export function listTrackedChannelBotPairsForTests(): PairLoopGuardSnapshotEntry[] {
|
||||
return channelBotPairLoopGuard.snapshot();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ export {
|
||||
export type { BuildChannelInboundEventContextParams } from "../inbound-event/context.js";
|
||||
export {
|
||||
clearChannelBotPairLoopGuardForTests,
|
||||
listTrackedChannelBotPairsForTests,
|
||||
recordChannelBotPairLoopAndCheckSuppression,
|
||||
} from "./bot-loop-protection.js";
|
||||
export { createChannelHistoryWindow } from "./history-window.js";
|
||||
|
||||
Reference in New Issue
Block a user