























@@ -51,6 +51,7 @@ type TelegramQaScenarioId =
5151| "telegram-mention-gating";
52525353type TelegramQaScenarioRun = {
54+allowAnySutReply?: boolean;
5455expectReply: boolean;
5556input: string;
5657expectedTextIncludes?: string[];
@@ -268,15 +269,11 @@ const TELEGRAM_QA_SCENARIOS: TelegramQaScenarioDefinition[] = [
268269id: "telegram-mentioned-message-reply",
269270title: "Telegram mentioned message gets a reply",
270271timeoutMs: 45_000,
271-buildRun: (sutUsername) => {
272-const token = `TELEGRAM_QA_REPLY_${randomUUID().slice(0, 8).toUpperCase()}`;
273-return {
274-expectReply: true,
275-input: `@${sutUsername} reply with only this exact marker: ${token}`,
276-expectedTextIncludes: [token],
277-matchText: token,
278-};
279-},
272+buildRun: (sutUsername) => ({
273+allowAnySutReply: true,
274+expectReply: true,
275+input: `@${sutUsername} Telegram QA mention routing check. Reply with a short acknowledgement.`,
276+}),
280277},
281278{
282279id: "telegram-mention-gating",
@@ -758,6 +755,7 @@ function findScenario(ids?: string[]) {
758755759756function matchesTelegramScenarioReply(params: {
760757groupId: string;
758+allowAnySutReply?: boolean;
761759matchText?: string;
762760message: TelegramObservedMessage;
763761sentMessageId: number;
@@ -772,6 +770,9 @@ function matchesTelegramScenarioReply(params: {
772770if (params.message.replyToMessageId === params.sentMessageId) {
773771return true;
774772}
773+if (params.allowAnySutReply === true) {
774+return true;
775+}
775776return Boolean(params.matchText && params.message.text.includes(params.matchText));
776777}
777778@@ -1223,6 +1224,7 @@ export async function runTelegramQaLive(params: {
12231224observationScenarioTitle: scenario.title,
12241225predicate: (message) =>
12251226matchesTelegramScenarioReply({
1227+allowAnySutReply: scenarioRun.allowAnySutReply,
12261228groupId: runtimeEnv.groupId,
12271229matchText: scenarioRun.matchText,
12281230 message,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。