mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-03 04:24:36 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68c7de5199 | ||
|
|
4dfb8597ae | ||
|
|
0623f4009a | ||
|
|
06adeb72c4 |
@@ -139,7 +139,7 @@ class ComponentDiscoveryEngine:
|
||||
|
||||
def load_component_manifest(self, path: str, owner: str = 'builtin', no_save: bool = False) -> Component:
|
||||
"""加载组件清单"""
|
||||
with open(path, 'r') as f:
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
manifest = yaml.safe_load(f)
|
||||
comp = Component(
|
||||
owner=owner,
|
||||
|
||||
@@ -110,7 +110,7 @@ class PlatformManager:
|
||||
if len(self.adapters) == 0:
|
||||
self.ap.logger.warning('未运行平台适配器,请根据文档配置并启用平台适配器。')
|
||||
|
||||
async def write_back_config(self, adapter_inst: msadapter.MessagePlatformAdapter, config: dict):
|
||||
async def write_back_config(self, adapter_name: str, adapter_inst: msadapter.MessagePlatformAdapter, config: dict):
|
||||
index = -2
|
||||
|
||||
for i, adapter in enumerate(self.adapters):
|
||||
@@ -132,7 +132,7 @@ class PlatformManager:
|
||||
break
|
||||
|
||||
new_cfg = {
|
||||
'adapter': adapter_inst.name,
|
||||
'adapter': adapter_name,
|
||||
'enable': True,
|
||||
**config
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ class GeWeChatAdapter(adapter.MessagePlatformAdapter):
|
||||
|
||||
self.ap.logger.info(f"Gewechat 登录成功,app_id: {app_id}")
|
||||
|
||||
await self.ap.platform_mgr.write_back_config(self, self.config)
|
||||
await self.ap.platform_mgr.write_back_config('gewechat', self, self.config)
|
||||
|
||||
# 获取 nickname
|
||||
profile = self.bot.get_profile(self.config["app_id"])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
semantic_version = "v3.4.9.1"
|
||||
semantic_version = "v3.4.9.3"
|
||||
|
||||
debug_mode = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user