Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import { getChannelPlugin } from "../../channels/plugins/index.js";
import type { ChannelPlugin } from "../../channels/plugins/types.plugin.js";
import type { ChannelId, ChannelSetupInput } from "../../channels/plugins/types.public.js";
import type { OpenClawConfig } from "../../config/types.openclaw.js";
import { normalizeAccountId } from "../../routing/session-key.js";
type ChatChannel = ChannelId;
export function applyAccountName(params: {
cfg: OpenClawConfig;
channel: ChatChannel;
accountId: string;
name?: string;
plugin?: ChannelPlugin;
}): OpenClawConfig {
const accountId = normalizeAccountId(params.accountId);
const plugin = params.plugin ?? getChannelPlugin(params.channel);
const apply = plugin?.setup?.applyAccountName;
return apply ? apply({ cfg: params.cfg, accountId, name: params.name }) : params.cfg;
}
export function applyChannelAccountConfig(params: {
cfg: OpenClawConfig;
channel: ChatChannel;
accountId: string;
input: ChannelSetupInput;
plugin?: ChannelPlugin;
}): OpenClawConfig {
const accountId = normalizeAccountId(params.accountId);
const plugin = params.plugin ?? getChannelPlugin(params.channel);
const apply = plugin?.setup?.applyAccountConfig;
if (!apply) {
return params.cfg;
}
return apply({ cfg: params.cfg, accountId, input: params.input });
}
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet am 2026-04-26)
¤
*© Formatika GbR, Deutschland