mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:44:32 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { listChannelPlugins } from "../channels/plugins/index.js";
|
||||
import type { ChannelAccountSnapshot, ChannelPlugin } from "../channels/plugins/types.js";
|
||||
import { type ClawdbotConfig, loadConfig } from "../config/config.js";
|
||||
import { type MoltbotConfig, loadConfig } from "../config/config.js";
|
||||
import { DEFAULT_ACCOUNT_ID } from "../routing/session-key.js";
|
||||
import { theme } from "../terminal/theme.js";
|
||||
|
||||
@@ -34,7 +34,7 @@ const accountLine = (label: string, details: string[]) =>
|
||||
const resolveAccountEnabled = (
|
||||
plugin: ChannelPlugin,
|
||||
account: unknown,
|
||||
cfg: ClawdbotConfig,
|
||||
cfg: MoltbotConfig,
|
||||
): boolean => {
|
||||
if (plugin.config.isEnabled) {
|
||||
return plugin.config.isEnabled(account, cfg);
|
||||
@@ -47,7 +47,7 @@ const resolveAccountEnabled = (
|
||||
const resolveAccountConfigured = async (
|
||||
plugin: ChannelPlugin,
|
||||
account: unknown,
|
||||
cfg: ClawdbotConfig,
|
||||
cfg: MoltbotConfig,
|
||||
): Promise<boolean> => {
|
||||
if (plugin.config.isConfigured) {
|
||||
return await plugin.config.isConfigured(account, cfg);
|
||||
@@ -58,7 +58,7 @@ const resolveAccountConfigured = async (
|
||||
const buildAccountSnapshot = (params: {
|
||||
plugin: ChannelPlugin;
|
||||
account: unknown;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
accountId: string;
|
||||
enabled: boolean;
|
||||
configured: boolean;
|
||||
@@ -76,7 +76,7 @@ const buildAccountSnapshot = (params: {
|
||||
|
||||
const formatAllowFrom = (params: {
|
||||
plugin: ChannelPlugin;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
accountId?: string | null;
|
||||
allowFrom: Array<string | number>;
|
||||
}) => {
|
||||
@@ -93,7 +93,7 @@ const formatAllowFrom = (params: {
|
||||
const buildAccountDetails = (params: {
|
||||
entry: ChannelAccountEntry;
|
||||
plugin: ChannelPlugin;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
includeAllowFrom: boolean;
|
||||
}): string[] => {
|
||||
const details: string[] = [];
|
||||
@@ -129,7 +129,7 @@ const buildAccountDetails = (params: {
|
||||
};
|
||||
|
||||
export async function buildChannelSummary(
|
||||
cfg?: ClawdbotConfig,
|
||||
cfg?: MoltbotConfig,
|
||||
options?: ChannelSummaryOptions,
|
||||
): Promise<string[]> {
|
||||
const effective = cfg ?? loadConfig();
|
||||
|
||||
Reference in New Issue
Block a user