openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
30 lines (29 loc) • 1.62 kB
JavaScript
import { t as formatCliCommand } from "./command-format-CqdwUgPk.mjs";
//#region src/cli/error-format.ts
const DEFAULT_GATEWAY_PORT_EXAMPLE = 18789;
function formatInlineCliCommand(e) {
return `\`${formatCliCommand(e)}\``;
}
function formatPortRangeHint() {
return `Use a port number from 1 to 65535, for example ${DEFAULT_GATEWAY_PORT_EXAMPLE}.`;
}
function formatInvalidPortOption(e) {
return `Invalid ${e}. ${formatPortRangeHint()}`;
}
function formatInvalidConfigPort(e) {
return `Invalid ${e} in config. Set ${e} to a number from 1 to 65535, or pass --port ${DEFAULT_GATEWAY_PORT_EXAMPLE}.`;
}
function formatUnknownChannelMessage(e) {
return `Unknown channel "${e.channel}". Run ${formatInlineCliCommand("openclaw channels list --all")} to see configured and installable channels.`;
}
function formatUnsupportedChannelActionMessage(e) {
const t = e.inspectCommand ?? `openclaw channels capabilities --channel ${e.channel}`;
return `Channel "${e.channel}" does not support ${e.action}. Run ${formatInlineCliCommand(t)} to inspect supported actions.`;
}
function formatMissingPluginMessage(e) {
const t = e.listCommand ?? "openclaw plugins list";
const n = e.includeSearch ? `, or ${formatInlineCliCommand("openclaw plugins search " + e.id)} to look for installable plugins` : "";
return `Plugin not found: ${e.id}. Run ${formatInlineCliCommand(t)} to see installed plugins${n}.`;
}
//#endregion
export { formatUnknownChannelMessage as a, formatPortRangeHint as i, formatInvalidPortOption as n, formatUnsupportedChannelActionMessage as o, formatMissingPluginMessage as r, formatInvalidConfigPort as t };