mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 07:42:04 +00:00
refactor: dedupe config presence string helper
This commit is contained in:
parent
3a42641208
commit
d94938ff54
1 changed files with 1 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue