feat: prepare Zhinian desktop pilot
This commit is contained in:
@@ -22,6 +22,8 @@ import {
|
||||
const OPENCLAW_DIR = join(homedir(), '.openclaw');
|
||||
const CONFIG_FILE = join(OPENCLAW_DIR, 'openclaw.json');
|
||||
const WECOM_PLUGIN_ID = 'wecom';
|
||||
const DISABLED_PLUGIN_CHANNEL_TYPES = new Set(['dingtalk', 'wecom', 'feishu']);
|
||||
const DISABLED_PLUGIN_IDS = ['dingtalk', 'wecom', 'feishu', 'openclaw-lark', 'feishu-openclaw-plugin'];
|
||||
// Note: QQBot is a built-in channel since OpenClaw 3.31 — no plugin ID needed.
|
||||
const WECHAT_PLUGIN_ID = OPENCLAW_WECHAT_CHANNEL_TYPE;
|
||||
const FEISHU_PLUGIN_ID_CANDIDATES = ['openclaw-lark', 'feishu-openclaw-plugin'] as const;
|
||||
@@ -417,6 +419,13 @@ export async function writeOpenClawConfig(config: OpenClawConfig): Promise<void>
|
||||
// ── Channel operations ───────────────────────────────────────────
|
||||
|
||||
async function ensurePluginAllowlist(currentConfig: OpenClawConfig, channelType: string): Promise<void> {
|
||||
if (DISABLED_PLUGIN_CHANNEL_TYPES.has(channelType)) {
|
||||
for (const pluginId of DISABLED_PLUGIN_IDS) {
|
||||
removePluginRegistration(currentConfig, pluginId);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (PLUGIN_CHANNELS.includes(channelType)) {
|
||||
ensurePluginRegistration(currentConfig, channelType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user