mirror of
https://ghfast.top/https://github.com/aeroxw/tick-stock-panel.git
synced 2026-09-12 21:24:16 +08:00
- 新增 voiceBroadcast.ts: 浏览器原生 speechSynthesis, 零依赖/零后端改动 - 按 source 分类拼接文案, 必念个股名称不念代码, 含涨跌幅 · strategy: [名称] 进入/移出 策略「名」 [涨跌幅] · signal: [名称] 买入/卖出信号触发 [涨跌幅] · price/market: [名称] [条件摘要] [涨跌幅] - 默认偏好 Google 中国大陆语音 (音质最佳), 异步注入自动同步回显 - 整批合并一句 + 正在播报时丢弃新批次 (防快行情叠噪音) - AlertToast 加 dispatchSideEffects 聚合点: 弹窗逻辑与副作用职责分离 - System 设置页加语音播报区: 开关(默认关)/音色/语速/试听 - 版本号同步升至 0.1.84 (VERSION / __version__ / package.json) - README 监控中心加语音播报特性说明
16 lines
540 B
Python
16 lines
540 B
Python
"""TickFlow Stock Panel backend."""
|
|
|
|
import sys
|
|
|
|
__version__ = "0.1.84"
|
|
|
|
# Windows 默认 stdout/stderr 编码为 GBK(cp936),TickFlow SDK 内部输出含 emoji 的
|
|
# 指数/标的名称(如 \U0001f193)时会抛 UnicodeEncodeError,导致请求失败。
|
|
# 进程加载最早阶段强制 UTF-8,根治此类编码崩溃。
|
|
for _stream in (sys.stdout, sys.stderr):
|
|
if hasattr(_stream, "reconfigure"):
|
|
try:
|
|
_stream.reconfigure(encoding="utf-8", errors="replace")
|
|
except Exception: # noqa: BLE001
|
|
pass
|