refactor(shared): trim helper constants

This commit is contained in:
Vincent Koc
2026-06-17 16:06:41 +08:00
parent 884a6a113c
commit c12d921291
3 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/** Upper bound for config path array indexes to reject impractical sparse writes. */
export const MAX_CONFIG_PATH_ARRAY_INDEX = 100_000;
const MAX_CONFIG_PATH_ARRAY_INDEX = 100_000;
const CANONICAL_ARRAY_INDEX_SEGMENT = /^(0|[1-9]\d*)$/;

View File

@@ -32,7 +32,7 @@ export function truncateLine(value: string, maxLength: number) {
return `${value.slice(0, maxLength).trimEnd()}...`;
}
export type TokenUsageLike = {
type TokenUsageLike = {
totalTokens?: unknown;
inputTokens?: unknown;
outputTokens?: unknown;

View File

@@ -1,7 +1,7 @@
// Identifies OpenClaw-authored assistant rows that are transcript bookkeeping,
// not provider model output. Some history surfaces keep gateway-injected rows
// visible, so use the narrower delivery-mirror predicate when visibility matters.
export const TRANSCRIPT_ONLY_OPENCLAW_ASSISTANT_MODELS = new Set<string>([
const TRANSCRIPT_ONLY_OPENCLAW_ASSISTANT_MODELS = new Set<string>([
"delivery-mirror",
"gateway-injected",
]);