refactor: trim zalouser helper exports · openclaw/openclaw@c25fb9a
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -217,5 +217,3 @@ export const zalouserPlugin: ChannelPlugin<ResolvedZalouserAccount, ZalouserProb
|
217 | 217 | }, |
218 | 218 | outbound: zalouserOutboundAdapter, |
219 | 219 | }); |
220 | | - |
221 | | -export type { ResolvedZalouserAccount }; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ function asObjectRecord(value: unknown): Record<string, unknown> | null {
|
9 | 9 | : null; |
10 | 10 | } |
11 | 11 | |
12 | | -export const collectZalouserMutableAllowlistWarnings = |
| 12 | +const collectZalouserMutableAllowlistWarnings = |
13 | 13 | createDangerousNameMatchingMutableAllowlistWarningCollector({ |
14 | 14 | channel: "zalouser", |
15 | 15 | detector: isZalouserMutableGroupEntry, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -10,8 +10,8 @@ import {
|
10 | 10 | } from "./zalo-js.js"; |
11 | 11 | import { TextStyle } from "./zca-constants.js"; |
12 | 12 | |
13 | | -export type ZalouserSendOptions = ZaloSendOptions; |
14 | | -export type ZalouserSendResult = ZaloSendResult; |
| 13 | +type ZalouserSendOptions = ZaloSendOptions; |
| 14 | +type ZalouserSendResult = ZaloSendResult; |
15 | 15 | |
16 | 16 | const ZALO_TEXT_LIMIT = 2000; |
17 | 17 | const DEFAULT_TEXT_CHUNK_MODE = "length"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ import {
|
7 | 7 | normalizeOptionalLowercaseString, |
8 | 8 | } from "openclaw/plugin-sdk/text-runtime"; |
9 | 9 | |
10 | | -export function stripZalouserTargetPrefix(raw: string): string { |
| 10 | +function stripZalouserTargetPrefix(raw: string): string { |
11 | 11 | return raw |
12 | 12 | .trim() |
13 | 13 | .replace(/^(zalouser|zlu):/i, "") |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ import { buildChannelConfigSchema, formatAllowFromLowercase } from "./channel-ap
|
15 | 15 | import { ZalouserConfigSchema } from "./config-schema.js"; |
16 | 16 | import { zalouserDoctor } from "./doctor.js"; |
17 | 17 | |
18 | | -export const zalouserMeta = { |
| 18 | +const zalouserMeta: ChannelPlugin<ResolvedZalouserAccount>["meta"] = { |
19 | 19 | id: "zalouser", |
20 | 20 | label: "Zalo Personal", |
21 | 21 | selectionLabel: "Zalo (Personal Account)", |
@@ -25,7 +25,7 @@ export const zalouserMeta = {
|
25 | 25 | aliases: ["zlu"], |
26 | 26 | order: 85, |
27 | 27 | quickstartAllowFrom: false, |
28 | | -} satisfies ChannelPlugin<ResolvedZalouserAccount>["meta"]; |
| 28 | +}; |
29 | 29 | |
30 | 30 | const zalouserConfigAdapter = createScopedChannelConfigAdapter<ResolvedZalouserAccount>({ |
31 | 31 | sectionKey: "zalouser", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,7 +28,7 @@ function stringEnum<T extends readonly string[]>(
|
28 | 28 | }); |
29 | 29 | } |
30 | 30 | |
31 | | -export const ZalouserToolSchema = Type.Object( |
| 31 | +const ZalouserToolSchema = Type.Object( |
32 | 32 | { |
33 | 33 | action: stringEnum(ACTIONS, { description: `Action to perform: ${ACTIONS.join(", ")}` }), |
34 | 34 | threadId: Type.Optional(Type.String({ description: "Thread ID for messaging" })), |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -85,7 +85,7 @@ export type ZaloAuthStatus = {
|
85 | 85 | message: string; |
86 | 86 | }; |
87 | 87 | |
88 | | -export type ZalouserToolConfig = { allow?: string[]; deny?: string[] }; |
| 88 | +type ZalouserToolConfig = { allow?: string[]; deny?: string[] }; |
89 | 89 | |
90 | 90 | export type ZalouserGroupConfig = { |
91 | 91 | enabled?: boolean; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1025,7 +1025,7 @@ function toInboundMessage(message: Message, ownUserId?: string): ZaloInboundMess
|
1025 | 1025 | }; |
1026 | 1026 | } |
1027 | 1027 | |
1028 | | -export function zalouserSessionExists(profileInput?: string | null): boolean { |
| 1028 | +function zalouserSessionExists(profileInput?: string | null): boolean { |
1029 | 1029 | const profile = normalizeProfile(profileInput); |
1030 | 1030 | return readCredentials(profile) !== null; |
1031 | 1031 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。