docs: generalize core routing comments · openclaw/openclaw@866a120
steipete
·
2026-04-22
·
via Recent Commits to openclaw:main
4 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|
@@ -57,7 +57,7 @@ export function createOpenClawTools(
|
57 | 57 | agentSessionKey?: string; |
58 | 58 | agentChannel?: GatewayMessageChannel; |
59 | 59 | agentAccountId?: string; |
60 | | -/** Delivery target (e.g. telegram:group:123:topic:456) for topic/thread routing. */ |
| 60 | +/** Delivery target for topic/thread routing. */ |
61 | 61 | agentTo?: string; |
62 | 62 | /** Thread/topic identifier for routing replies to the originating thread. */ |
63 | 63 | agentThreadId?: string | number; |
@@ -69,13 +69,13 @@ export function createOpenClawTools(
|
69 | 69 | sandboxed?: boolean; |
70 | 70 | config?: OpenClawConfig; |
71 | 71 | pluginToolAllowlist?: string[]; |
72 | | -/** Current channel ID for auto-threading (Slack). */ |
| 72 | +/** Current channel ID for auto-threading. */ |
73 | 73 | currentChannelId?: string; |
74 | | -/** Current thread timestamp for auto-threading (Slack). */ |
| 74 | +/** Current thread timestamp for auto-threading. */ |
75 | 75 | currentThreadTs?: string; |
76 | | -/** Current inbound message id for action fallbacks (e.g. Telegram react). */ |
| 76 | +/** Current inbound message id for action fallbacks. */ |
77 | 77 | currentMessageId?: string | number; |
78 | | -/** Reply-to mode for Slack auto-threading. */ |
| 78 | +/** Reply-to mode for auto-threading. */ |
79 | 79 | replyToMode?: "off" | "first" | "all" | "batched"; |
80 | 80 | /** Mutable ref to track if a reply was sent (for "first" mode). */ |
81 | 81 | hasRepliedRef?: { value: boolean }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -158,7 +158,7 @@ function isValidBase64(value: string): boolean {
|
158 | 158 | * Node's Buffer.from silently drops invalid base64 characters rather than |
159 | 159 | * throwing. A material size discrepancy means the source string contained |
160 | 160 | * embedded garbage that was silently stripped, which would produce a corrupted |
161 | | - * file on disk. ±3 bytes of slack accounts for base64 padding rounding. |
| 161 | + * file on disk. ±3 bytes of leeway accounts for base64 padding rounding. |
162 | 162 | * |
163 | 163 | * IMPORTANT: this is an input-validation check (4xx client error). |
164 | 164 | * It MUST be called OUTSIDE the MediaOffloadError try/catch so that |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -643,7 +643,7 @@ export const agentHandlers: GatewayRequestHandlers = {
|
643 | 643 | const deliveryFields = normalizeSessionDeliveryFields(entry); |
644 | 644 | // When the session has no delivery context yet (e.g. a freshly-spawned subagent |
645 | 645 | // with deliver: false), seed it from the request's channel/to/threadId params. |
646 | | -// Without this, subagent sessions end up with deliveryContext: {channel: "slack"} |
| 646 | +// Without this, subagent sessions end up with a channel-only deliveryContext |
647 | 647 | // and no `to`/`threadId`, which causes announce delivery to either target the |
648 | 648 | // wrong channel (when the parent's lastTo drifts) or fail entirely. |
649 | 649 | const requestDeliveryHint = normalizeDeliveryContext({ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,7 @@ const DEFAULT_VISIBILITY: ResolvedHeartbeatVisibility = {
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * Resolve heartbeat visibility settings for a channel. |
19 | | - * Supports both deliverable channels (telegram, signal, etc.) and webchat. |
| 19 | + * Supports both deliverable channels and webchat. |
20 | 20 | * For webchat, uses channels.defaults.heartbeat since webchat doesn't have per-channel config. |
21 | 21 | */ |
22 | 22 | export function resolveHeartbeatVisibility(params: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。