refactor(shared): trim helper constants · openclaw/openclaw@c12d921
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | /** Upper bound for config path array indexes to reject impractical sparse writes. */ |
2 | | -export const MAX_CONFIG_PATH_ARRAY_INDEX = 100_000; |
| 2 | +const MAX_CONFIG_PATH_ARRAY_INDEX = 100_000; |
3 | 3 | |
4 | 4 | const CANONICAL_ARRAY_INDEX_SEGMENT = /^(0|[1-9]\d*)$/; |
5 | 5 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -32,7 +32,7 @@ export function truncateLine(value: string, maxLength: number) {
|
32 | 32 | return `${value.slice(0, maxLength).trimEnd()}...`; |
33 | 33 | } |
34 | 34 | |
35 | | -export type TokenUsageLike = { |
| 35 | +type TokenUsageLike = { |
36 | 36 | totalTokens?: unknown; |
37 | 37 | inputTokens?: unknown; |
38 | 38 | outputTokens?: unknown; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Identifies OpenClaw-authored assistant rows that are transcript bookkeeping, |
2 | 2 | // not provider model output. Some history surfaces keep gateway-injected rows |
3 | 3 | // visible, so use the narrower delivery-mirror predicate when visibility matters. |
4 | | -export const TRANSCRIPT_ONLY_OPENCLAW_ASSISTANT_MODELS = new Set<string>([ |
| 4 | +const TRANSCRIPT_ONLY_OPENCLAW_ASSISTANT_MODELS = new Set<string>([ |
5 | 5 | "delivery-mirror", |
6 | 6 | "gateway-injected", |
7 | 7 | ]); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。