mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-14 02:36:03 +00:00
refactor(shared): trim helper constants
This commit is contained in:
@@ -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*)$/;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user