mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 09:11:22 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -3,7 +3,7 @@ import { getFinishedSession, getSession, markExited } from "../../agents/bash-pr
|
||||
import { createExecTool } from "../../agents/bash-tools.js";
|
||||
import { resolveSandboxRuntimeStatus } from "../../agents/sandbox.js";
|
||||
import { killProcessTree } from "../../agents/shell-utils.js";
|
||||
import type { ClawdbotConfig } from "../../config/config.js";
|
||||
import type { MoltbotConfig } from "../../config/config.js";
|
||||
import { formatCliCommand } from "../../cli/command-format.js";
|
||||
import { logVerbose } from "../../globals.js";
|
||||
import { clampInt } from "../../utils.js";
|
||||
@@ -33,7 +33,7 @@ type ActiveBashJob =
|
||||
|
||||
let activeJob: ActiveBashJob | null = null;
|
||||
|
||||
function resolveForegroundMs(cfg: ClawdbotConfig): number {
|
||||
function resolveForegroundMs(cfg: MoltbotConfig): number {
|
||||
const raw = cfg.commands?.bashForegroundMs;
|
||||
if (typeof raw !== "number" || Number.isNaN(raw)) return DEFAULT_FOREGROUND_MS;
|
||||
return clampInt(raw, 0, MAX_FOREGROUND_MS);
|
||||
@@ -87,7 +87,7 @@ function parseBashRequest(raw: string): BashRequest | null {
|
||||
|
||||
function resolveRawCommandBody(params: {
|
||||
ctx: MsgContext;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
agentId?: string;
|
||||
isGroup: boolean;
|
||||
}) {
|
||||
@@ -169,7 +169,7 @@ function formatElevatedUnavailableMessage(params: {
|
||||
lines.push("- agents.list[].tools.elevated.allowFrom.<provider>");
|
||||
if (params.sessionKey) {
|
||||
lines.push(
|
||||
`See: ${formatCliCommand(`clawdbot sandbox explain --session ${params.sessionKey}`)}`,
|
||||
`See: ${formatCliCommand(`moltbot sandbox explain --session ${params.sessionKey}`)}`,
|
||||
);
|
||||
}
|
||||
return lines.join("\n");
|
||||
@@ -177,7 +177,7 @@ function formatElevatedUnavailableMessage(params: {
|
||||
|
||||
export async function handleBashChatCommand(params: {
|
||||
ctx: MsgContext;
|
||||
cfg: ClawdbotConfig;
|
||||
cfg: MoltbotConfig;
|
||||
agentId?: string;
|
||||
sessionKey: string;
|
||||
isGroup: boolean;
|
||||
|
||||
Reference in New Issue
Block a user