ForcePilot/backend/package/yuxi/channels/adapters/wechat/capabilities.py

61 lines
1.5 KiB
Python
Raw Normal View History

from __future__ import annotations
from typing import Any
from yuxi.channels.meta import ChannelMeta
WECHAT_META = ChannelMeta(
id="wechat",
label="微信",
selection_label="微信 (WeChat)",
docs_path="docs/channels/wechat",
docs_label="WeChat 文档",
blurb="微信渠道适配器,支持企业微信/公众号/个人微信桥接三种模式",
order=8,
aliases=["weixin", "WeChat"],
detail_label="WeChat 微信",
system_image="wechat",
markdown_capable=True,
exposure="configured",
show_configured=True,
show_in_setup=True,
quickstart_allow_from=[],
force_account_binding=False,
prefer_session_lookup_for_announce_target=False,
prefer_over=False,
)
WECHAT_CAPABILITIES: dict[str, Any] = {
"chatTypes": ["direct", "group"],
"polls": False,
"reactions": False,
"edit": False,
"unsend": False,
"reply": True,
"effects": False,
"groupManagement": True,
"threads": False,
"media": True,
"streaming": False,
"tts": {"voice": {"enabled": True, "synthesis_target": "voice-note"}},
"nativeCommands": False,
"blockStreaming": False,
}
WECHAT_MESSAGE_CAPABILITIES: dict[str, bool] = {
"presentation": False,
"delivery-pin": False,
}
def get_meta() -> ChannelMeta:
return WECHAT_META
def get_capabilities() -> dict[str, Any]:
return dict(WECHAT_CAPABILITIES)
def get_message_capabilities() -> dict[str, bool]:
return dict(WECHAT_MESSAGE_CAPABILITIES)