mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
refactor: dedupe config presence string helper
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user