mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:20:43 +00:00
refactor: trim zalouser helper exports
This commit is contained in:
@@ -217,5 +217,3 @@ export const zalouserPlugin: ChannelPlugin<ResolvedZalouserAccount, ZalouserProb
|
||||
},
|
||||
outbound: zalouserOutboundAdapter,
|
||||
});
|
||||
|
||||
export type { ResolvedZalouserAccount };
|
||||
|
||||
@@ -9,7 +9,7 @@ function asObjectRecord(value: unknown): Record<string, unknown> | null {
|
||||
: null;
|
||||
}
|
||||
|
||||
export const collectZalouserMutableAllowlistWarnings =
|
||||
const collectZalouserMutableAllowlistWarnings =
|
||||
createDangerousNameMatchingMutableAllowlistWarningCollector({
|
||||
channel: "zalouser",
|
||||
detector: isZalouserMutableGroupEntry,
|
||||
|
||||
@@ -10,8 +10,8 @@ import {
|
||||
} from "./zalo-js.js";
|
||||
import { TextStyle } from "./zca-constants.js";
|
||||
|
||||
export type ZalouserSendOptions = ZaloSendOptions;
|
||||
export type ZalouserSendResult = ZaloSendResult;
|
||||
type ZalouserSendOptions = ZaloSendOptions;
|
||||
type ZalouserSendResult = ZaloSendResult;
|
||||
|
||||
const ZALO_TEXT_LIMIT = 2000;
|
||||
const DEFAULT_TEXT_CHUNK_MODE = "length";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
normalizeOptionalLowercaseString,
|
||||
} from "openclaw/plugin-sdk/text-runtime";
|
||||
|
||||
export function stripZalouserTargetPrefix(raw: string): string {
|
||||
function stripZalouserTargetPrefix(raw: string): string {
|
||||
return raw
|
||||
.trim()
|
||||
.replace(/^(zalouser|zlu):/i, "")
|
||||
|
||||
@@ -15,7 +15,7 @@ import { buildChannelConfigSchema, formatAllowFromLowercase } from "./channel-ap
|
||||
import { ZalouserConfigSchema } from "./config-schema.js";
|
||||
import { zalouserDoctor } from "./doctor.js";
|
||||
|
||||
export const zalouserMeta = {
|
||||
const zalouserMeta: ChannelPlugin<ResolvedZalouserAccount>["meta"] = {
|
||||
id: "zalouser",
|
||||
label: "Zalo Personal",
|
||||
selectionLabel: "Zalo (Personal Account)",
|
||||
@@ -25,7 +25,7 @@ export const zalouserMeta = {
|
||||
aliases: ["zlu"],
|
||||
order: 85,
|
||||
quickstartAllowFrom: false,
|
||||
} satisfies ChannelPlugin<ResolvedZalouserAccount>["meta"];
|
||||
};
|
||||
|
||||
const zalouserConfigAdapter = createScopedChannelConfigAdapter<ResolvedZalouserAccount>({
|
||||
sectionKey: "zalouser",
|
||||
|
||||
@@ -28,7 +28,7 @@ function stringEnum<T extends readonly string[]>(
|
||||
});
|
||||
}
|
||||
|
||||
export const ZalouserToolSchema = Type.Object(
|
||||
const ZalouserToolSchema = Type.Object(
|
||||
{
|
||||
action: stringEnum(ACTIONS, { description: `Action to perform: ${ACTIONS.join(", ")}` }),
|
||||
threadId: Type.Optional(Type.String({ description: "Thread ID for messaging" })),
|
||||
|
||||
@@ -85,7 +85,7 @@ export type ZaloAuthStatus = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
export type ZalouserToolConfig = { allow?: string[]; deny?: string[] };
|
||||
type ZalouserToolConfig = { allow?: string[]; deny?: string[] };
|
||||
|
||||
export type ZalouserGroupConfig = {
|
||||
enabled?: boolean;
|
||||
|
||||
@@ -1025,7 +1025,7 @@ function toInboundMessage(message: Message, ownUserId?: string): ZaloInboundMess
|
||||
};
|
||||
}
|
||||
|
||||
export function zalouserSessionExists(profileInput?: string | null): boolean {
|
||||
function zalouserSessionExists(profileInput?: string | null): boolean {
|
||||
const profile = normalizeProfile(profileInput);
|
||||
return readCredentials(profile) !== null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user