refactor(auto-reply): hide command turn helper types · openclaw/openclaw@963783e
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,26 +3,26 @@ import { normalizeOptionalString } from "@openclaw/normalization-core/string-coe
|
3 | 3 | |
4 | 4 | export type CommandTurnKind = "native" | "text-slash" | "normal"; |
5 | 5 | /** Transport-level source labels carried through auto-reply dispatch. */ |
6 | | -export type CommandTurnSource = "native" | "text" | "message"; |
| 6 | +type CommandTurnSource = "native" | "text" | "message"; |
7 | 7 | |
8 | 8 | type BaseCommandTurnContext = { |
9 | 9 | commandName?: string; |
10 | 10 | body?: string; |
11 | 11 | }; |
12 | 12 | |
13 | | -export type NativeCommandTurnContext = BaseCommandTurnContext & { |
| 13 | +type NativeCommandTurnContext = BaseCommandTurnContext & { |
14 | 14 | kind: "native"; |
15 | 15 | source: "native"; |
16 | 16 | authorized: boolean; |
17 | 17 | }; |
18 | 18 | |
19 | | -export type TextSlashCommandTurnContext = BaseCommandTurnContext & { |
| 19 | +type TextSlashCommandTurnContext = BaseCommandTurnContext & { |
20 | 20 | kind: "text-slash"; |
21 | 21 | source: "text"; |
22 | 22 | authorized: boolean; |
23 | 23 | }; |
24 | 24 | |
25 | | -export type NormalCommandTurnContext = BaseCommandTurnContext & { |
| 25 | +type NormalCommandTurnContext = BaseCommandTurnContext & { |
26 | 26 | kind: "normal"; |
27 | 27 | source: "message"; |
28 | 28 | authorized: false; |
@@ -82,7 +82,7 @@ function normalizeCommandTurnSource(value: unknown): CommandTurnSource | undefin
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** Maps source metadata back to the closed turn kind used by command checks. */ |
85 | | -export function commandTurnSourceToKind(source: CommandTurnSource): CommandTurnKind { |
| 85 | +function commandTurnSourceToKind(source: CommandTurnSource): CommandTurnKind { |
86 | 86 | if (source === "native") { |
87 | 87 | return "native"; |
88 | 88 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。