refactor: trim matrix helper exports · openclaw/openclaw@0d7d1aa
steipete
·
2026-05-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,13 +21,13 @@ const MATRIX_APPROVAL_REACTION_ORDER = [
|
21 | 21 | "deny", |
22 | 22 | ] as const satisfies readonly ExecApprovalReplyDecision[]; |
23 | 23 | |
24 | | -export type MatrixApprovalReactionBinding = { |
| 24 | +type MatrixApprovalReactionBinding = { |
25 | 25 | decision: ExecApprovalReplyDecision; |
26 | 26 | emoji: string; |
27 | 27 | label: string; |
28 | 28 | }; |
29 | 29 | |
30 | | -export type MatrixApprovalReactionResolution = { |
| 30 | +type MatrixApprovalReactionResolution = { |
31 | 31 | approvalId: string; |
32 | 32 | decision: ExecApprovalReplyDecision; |
33 | 33 | }; |
@@ -71,7 +71,7 @@ export function buildMatrixApprovalReactionHint(
|
71 | 71 | return `React here: ${bindings.map((binding) => `${binding.emoji} ${binding.label}`).join(", ")}`; |
72 | 72 | } |
73 | 73 | |
74 | | -export function resolveMatrixApprovalReactionDecision( |
| 74 | +function resolveMatrixApprovalReactionDecision( |
75 | 75 | reactionKey: string, |
76 | 76 | allowedDecisions: readonly ExecApprovalReplyDecision[], |
77 | 77 | ): ExecApprovalReplyDecision | null { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,14 +18,14 @@ import {
|
18 | 18 | } from "./matrix/client/env-auth.js"; |
19 | 19 | import { resolveMatrixAccountStorageRoot, resolveMatrixCredentialsPath } from "./storage-paths.js"; |
20 | 20 | |
21 | | -export type MatrixStoredCredentials = { |
| 21 | +type MatrixStoredCredentials = { |
22 | 22 | homeserver: string; |
23 | 23 | userId: string; |
24 | 24 | accessToken: string; |
25 | 25 | deviceId?: string; |
26 | 26 | }; |
27 | 27 | |
28 | | -export type MatrixMigrationAccountTarget = { |
| 28 | +type MatrixMigrationAccountTarget = { |
29 | 29 | accountId: string; |
30 | 30 | homeserver: string; |
31 | 31 | userId: string; |
@@ -34,7 +34,7 @@ export type MatrixMigrationAccountTarget = {
|
34 | 34 | storedDeviceId: string | null; |
35 | 35 | }; |
36 | 36 | |
37 | | -export type MatrixLegacyFlatStoreTarget = MatrixMigrationAccountTarget & { |
| 37 | +type MatrixLegacyFlatStoreTarget = MatrixMigrationAccountTarget & { |
38 | 38 | selectionNote?: string; |
39 | 39 | }; |
40 | 40 | |
@@ -64,7 +64,7 @@ function resolveMatrixFlatStoreSelectionNote(
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 | |
67 | | -export function resolveMatrixMigrationConfigFields(params: { |
| 67 | +function resolveMatrixMigrationConfigFields(params: { |
68 | 68 | cfg: OpenClawConfig; |
69 | 69 | env: NodeJS.ProcessEnv; |
70 | 70 | accountId: string; |
@@ -101,7 +101,7 @@ export function resolveMatrixMigrationConfigFields(params: {
|
101 | 101 | }; |
102 | 102 | } |
103 | 103 | |
104 | | -export function loadStoredMatrixCredentials( |
| 104 | +function loadStoredMatrixCredentials( |
105 | 105 | env: NodeJS.ProcessEnv, |
106 | 106 | accountId: string, |
107 | 107 | ): MatrixStoredCredentials | null { |
@@ -135,7 +135,7 @@ export function loadStoredMatrixCredentials(
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | |
138 | | -export function credentialsMatchResolvedIdentity( |
| 138 | +function credentialsMatchResolvedIdentity( |
139 | 139 | stored: MatrixStoredCredentials | null, |
140 | 140 | identity: { |
141 | 141 | homeserver: string; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。