refactor: dedupe config presence string helper

This commit is contained in:
Peter Steinberger
2026-04-06 23:37:54 +01:00
parent 3a42641208
commit d94938ff54

View File

@@ -6,6 +6,7 @@ import {
} from "../channels/plugins/persisted-auth-state.js";
import type { OpenClawConfig } from "../config/config.js";
import { resolveStateDir } from "../config/paths.js";
import { hasNonEmptyString } from "../infra/outbound/channel-target.js";
import { isRecord } from "../utils.js";
import { listBundledChannelPluginIds } from "./plugins/bundled-ids.js";
@@ -15,10 +16,6 @@ type ChannelPresenceOptions = {
includePersistedAuthState?: boolean;
};
function hasNonEmptyString(value: unknown): boolean {
return typeof value === "string" && value.trim().length > 0;
}
export function hasMeaningfulChannelConfig(value: unknown): boolean {
if (!isRecord(value)) {
return false;