mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 15:10:22 +00:00
fix(ci): preserve channel auto-enable metadata
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { normalizeChatChannelId } from "../channels/registry.js";
|
||||
import { getChatChannelMeta, normalizeChatChannelId } from "../channels/registry.js";
|
||||
import type { PluginManifestRegistry } from "../plugins/manifest-registry.js";
|
||||
import { normalizeOptionalString } from "../shared/string-coerce.js";
|
||||
import { normalizeStringEntries } from "../shared/string-normalization.js";
|
||||
@@ -106,6 +106,10 @@ function resolvePreferredOverIds(
|
||||
if (installedChannelMeta?.preferOver?.length) {
|
||||
return [...installedChannelMeta.preferOver];
|
||||
}
|
||||
const bundledChannelMeta = getChatChannelMeta(normalized);
|
||||
if (bundledChannelMeta?.preferOver?.length) {
|
||||
return [...bundledChannelMeta.preferOver];
|
||||
}
|
||||
return resolveExternalCatalogPreferOver(pluginId, env);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
hasPotentialConfiguredChannels,
|
||||
listPotentialConfiguredChannelIds,
|
||||
} from "../channels/config-presence.js";
|
||||
import { normalizeChatChannelId } from "../channels/registry.js";
|
||||
import { getChatChannelMeta, normalizeChatChannelId } from "../channels/registry.js";
|
||||
import {
|
||||
loadPluginManifestRegistry,
|
||||
resolveManifestContractOwnerPluginId,
|
||||
@@ -608,8 +608,17 @@ function materializeConfiguredPluginEntryAllowlist(params: {
|
||||
return next;
|
||||
}
|
||||
|
||||
function resolveAutoEnableChangeReason(entry: PluginAutoEnableCandidate): string {
|
||||
if (entry.kind !== "channel-configured") {
|
||||
return resolvePluginAutoEnableCandidateReason(entry);
|
||||
}
|
||||
const channelId = normalizeChatChannelId(entry.channelId);
|
||||
const label = channelId ? getChatChannelMeta(channelId)?.label : undefined;
|
||||
return `${label ?? entry.channelId} configured`;
|
||||
}
|
||||
|
||||
function formatAutoEnableChange(entry: PluginAutoEnableCandidate): string {
|
||||
return `${resolvePluginAutoEnableCandidateReason(entry).trim()}, enabled automatically.`;
|
||||
return `${resolveAutoEnableChangeReason(entry).trim()}, enabled automatically.`;
|
||||
}
|
||||
|
||||
export function resolvePluginAutoEnableManifestRegistry(params: {
|
||||
|
||||
Reference in New Issue
Block a user