UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

13 lines (12 loc) • 966 B
import { f as OPENCLAW_MCP_TOOL_PREFIX } from "./cli-constants-CDevEMvo.mjs"; //#region extensions/anthropic/cli-tool-naming.ts const CLAUDE_CLI_TOOL_NAMING_HEADING = "## OpenClaw tool names in Claude Code"; const CLAUDE_CLI_TOOL_NAMING_SECTION = [CLAUDE_CLI_TOOL_NAMING_HEADING, `OpenClaw MCP: \`${OPENCLAW_MCP_TOOL_PREFIX}<name>\`. Deferred: ToolSearch \`select:${OPENCLAW_MCP_TOOL_PREFIX}<name>\` first.`].join("\n"); const CLAUDE_CLI_MESSAGE_TOOL_GUIDANCE = `Tool-only replies: \`${OPENCLAW_MCP_TOOL_PREFIX}message(action=send)\`. Native \`SendMessage\`/\`PushNotification\` cannot deliver OpenClaw replies.`; function appendClaudeCliToolNamingGuidance(e, t = []) { if (t.length === 0 || !e.trim() || e.includes(CLAUDE_CLI_TOOL_NAMING_HEADING)) return e; const n = t.includes("message") ? `\n${CLAUDE_CLI_MESSAGE_TOOL_GUIDANCE}` : ""; return `${e}\n\n${CLAUDE_CLI_TOOL_NAMING_SECTION}${n}\n`; } //#endregion export { appendClaudeCliToolNamingGuidance as t };