refactor: route chat and subtitle settings through runtime

This commit is contained in:
jxxghp
2026-08-23 03:17:40 +08:00
parent 55c80c87da
commit 061a92eab0
8 changed files with 24 additions and 17 deletions
+3 -1
View File
@@ -12,7 +12,9 @@ from typing import Optional, List, Tuple
from PIL import Image
from app.runtime.cache import FileCache
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo, Context
from app.domain.metainfo import MetaInfo
from app.runtime.log import logger
+3 -1
View File
@@ -4,7 +4,9 @@ from urllib.parse import urljoin, urlparse
from lxml import etree
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import Context
from app.application.site.query import get_configured_site_query_service
from app.application.site.sites import SitesHelper # pylint: disable=import-error,no-name-in-module
+3 -1
View File
@@ -36,7 +36,9 @@ try:
except ImportError:
from telegramify_markdown.type import ContentTypes, File, Photo, Text # noqa: E402
from app.runtime.config import settings # noqa: E402
from app.runtime.settings import RuntimeSettingsCompat # noqa: E402
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo, Context # noqa: E402
from app.domain.metainfo import MetaInfo # noqa: E402
from app.application.image import ImageHelper # noqa: E402
+3 -1
View File
@@ -12,7 +12,9 @@ import websocket
from Crypto.Cipher import AES
from app.runtime.cache import FileCache
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import MediaInfo, Context
from app.domain.metainfo import MetaInfo
from app.application.messaging.agent import matches_channel_admin
+3 -1
View File
@@ -17,7 +17,9 @@ from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
from app.runtime.cache import FileCache
from app.runtime.config import settings
from app.runtime.settings import RuntimeSettingsCompat
settings = RuntimeSettingsCompat()
from app.domain.context import Context, MediaInfo
from app.domain.metainfo import MetaInfo
from app.runtime.log import logger