refactor: trim discord helper exports · openclaw/openclaw@caf4fcb
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { ButtonStyle } from "discord-api-types/v10"; |
2 | 2 | import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime"; |
3 | | -import type { |
4 | | -ExecApprovalDecision, |
5 | | -ExecApprovalRequest, |
6 | | -ExecApprovalResolved, |
7 | | -PluginApprovalRequest, |
8 | | -PluginApprovalResolved, |
9 | | -} from "openclaw/plugin-sdk/approval-runtime"; |
| 3 | +import type { ExecApprovalDecision } from "openclaw/plugin-sdk/approval-runtime"; |
10 | 4 | import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; |
11 | 5 | import { Button, type ButtonInteraction, type ComponentData } from "../internal/discord.js"; |
12 | 6 | export { buildExecApprovalCustomId } from "../approval-handler.runtime.js"; |
13 | 7 | import { getDiscordExecApprovalApprovers } from "../exec-approvals.js"; |
14 | 8 | |
15 | 9 | export { extractDiscordChannelId } from "../approval-native.js"; |
16 | | -export type { |
17 | | -ExecApprovalRequest, |
18 | | -ExecApprovalResolved, |
19 | | -PluginApprovalRequest, |
20 | | -PluginApprovalResolved, |
21 | | -} from "openclaw/plugin-sdk/approval-runtime"; |
22 | | - |
23 | 10 | function decodeCustomIdValue(value: string): string { |
24 | 11 | try { |
25 | 12 | return decodeURIComponent(value); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,11 +6,7 @@ import {
|
6 | 6 | } from "openclaw/plugin-sdk/conversation-runtime"; |
7 | 7 | import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; |
8 | 8 | |
9 | | -export { |
10 | | -resolveThreadBindingIdleTimeoutMs, |
11 | | -resolveThreadBindingMaxAgeMs, |
12 | | -resolveThreadBindingsEnabled, |
13 | | -}; |
| 9 | +export { resolveThreadBindingsEnabled }; |
14 | 10 | |
15 | 11 | export function resolveDiscordThreadBindingIdleTimeoutMs(params: { |
16 | 12 | cfg: OpenClawConfig; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import {
|
11 | 11 | } from "openclaw/plugin-sdk/channel-secret-basic-runtime"; |
12 | 12 | import { collectNestedChannelTtsAssignments } from "openclaw/plugin-sdk/channel-secret-tts-runtime"; |
13 | 13 | |
14 | | -export const secretTargetRegistryEntries = [ |
| 14 | +export const secretTargetRegistryEntries: SecretTargetRegistryEntry[] = [ |
15 | 15 | { |
16 | 16 | id: "channels.discord.accounts.*.pluralkit.token", |
17 | 17 | targetType: "channels.discord.accounts.*.pluralkit.token", |
@@ -80,7 +80,7 @@ export const secretTargetRegistryEntries = [
|
80 | 80 | includeInAudit: true, |
81 | 81 | providerIdPathSegmentIndex: 4, |
82 | 82 | }, |
83 | | -] satisfies SecretTargetRegistryEntry[]; |
| 83 | +]; |
84 | 84 | |
85 | 85 | export function collectRuntimeConfigAssignments(params: { |
86 | 86 | config: { channels?: Record<string, unknown> }; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。