移除错误定价信号和市场聚焦摘要功能

保留关键市场警报推送(4 条触发规则不变),
移除 mispricing 信号分类/推送、focus digest 评分/聚合/定时推送、
/markets 手动查询等全套逻辑,净删除 1049 行。
This commit is contained in:
2569718930@qq.com
2026-05-07 21:42:06 +08:00
parent 30faac989c
commit 2183c0399d
6 changed files with 25 additions and 1049 deletions
+6 -32
View File
@@ -1,6 +1,5 @@
from __future__ import annotations
import threading
from typing import Any
from typing import Callable
@@ -252,42 +251,17 @@ class BasicCommandHandler:
if chat_type and chat_type != "private":
self.bot.reply_to(
message,
"️ `/markets` 仅支持私聊机器人查询。\n频道继续接收自动推送;如需手动查看当前市场概览,请私聊 bot 发送 `/markets`。",
"️ `/markets` 仅支持私聊机器人查询。",
parse_mode="Markdown",
)
trace.set_status("blocked", f"unsupported_chat_type:{chat_type}")
return
chat_id = getattr(getattr(message, "chat", None), "id", None)
from src.utils.telegram_push import (
build_market_monitor_digest,
load_cached_market_monitor_digest,
self.bot.reply_to(
message,
"️ 市场概览 (Focus Digest) 功能已移除。\n频道继续接收关键市场警报推送;如需查看当前市场状态,请访问 https://polyweather-pro.vercel.app/",
disable_web_page_preview=True,
)
cached_summary = load_cached_market_monitor_digest()
if cached_summary:
self.bot.reply_to(message, cached_summary, disable_web_page_preview=True)
else:
self.bot.reply_to(message, "⏳ 正在生成当前市场概览,请稍候...")
def _worker() -> None:
try:
summary = build_market_monitor_digest(
self.config,
slot_label="当前市场概览",
force_refresh=False,
)
if not cached_summary or summary.strip() != cached_summary.strip():
self.bot.send_message(chat_id, summary, disable_web_page_preview=True)
except Exception:
if not cached_summary:
self.bot.send_message(chat_id, "❌ 当前市场概览生成失败,请稍后重试。")
threading.Thread(
target=_worker,
name="telegram-markets-manual-query",
daemon=True,
).start()
trace.set_status("accepted")
trace.set_status("ok", "removed")
finally:
trace.emit()