mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 11:41:08 +00:00
refactor: dedupe cli lowercase helpers
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import type { Command } from "commander";
|
||||
import { getChannelPlugin } from "../../../channels/plugins/index.js";
|
||||
import type { ChannelMessageActionName } from "../../../channels/plugins/types.js";
|
||||
import { normalizeLowercaseStringOrEmpty } from "../../../shared/string-coerce.js";
|
||||
import type { MessageCliHelpers } from "./helpers.js";
|
||||
|
||||
function resolveThreadCreateRequest(opts: Record<string, unknown>) {
|
||||
const channel = typeof opts.channel === "string" ? opts.channel.trim().toLowerCase() : "";
|
||||
const channel = normalizeLowercaseStringOrEmpty(opts.channel);
|
||||
if (channel) {
|
||||
const request = getChannelPlugin(channel)?.actions?.resolveCliActionRequest?.({
|
||||
action: "thread-create",
|
||||
|
||||
Reference in New Issue
Block a user