refactor: hide shared constants · openclaw/openclaw@2f0c935
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ import fs from "node:fs";
|
17 | 17 | * `params.env` for per-child overrides. |
18 | 18 | */ |
19 | 19 | |
20 | | -export const CHILD_OOM_SCORE_ADJ_ENV_KEY = "OPENCLAW_CHILD_OOM_SCORE_ADJ"; |
| 20 | +const CHILD_OOM_SCORE_ADJ_ENV_KEY = "OPENCLAW_CHILD_OOM_SCORE_ADJ"; |
21 | 21 | const OOM_SCORE_WRAP_SHELL = "/bin/sh"; |
22 | 22 | const OOM_SCORE_WRAP_SCRIPT = 'echo 1000 > /proc/self/oom_score_adj 2>/dev/null; exec "$0" "$@"'; |
23 | 23 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -17,7 +17,7 @@ const STANDALONE_HTML_ERROR_HINT_RE =
|
17 | 17 | |
18 | 18 | export const MALFORMED_STREAMING_FRAGMENT_ERROR_MESSAGE = |
19 | 19 | "OpenClaw transport error: malformed_streaming_fragment"; |
20 | | -export const MALFORMED_STREAMING_FRAGMENT_USER_MESSAGE = |
| 20 | +const MALFORMED_STREAMING_FRAGMENT_USER_MESSAGE = |
21 | 21 | "LLM streaming response contained a malformed fragment. Please try again."; |
22 | 22 | |
23 | 23 | type ErrorPayload = Record<string, unknown>; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import type { AgentMessage } from "@mariozechner/pi-agent-core"; |
2 | 2 | |
3 | | -export const GOOGLE_TURN_ORDER_BOOTSTRAP_TEXT = "(session bootstrap)"; |
| 3 | +const GOOGLE_TURN_ORDER_BOOTSTRAP_TEXT = "(session bootstrap)"; |
4 | 4 | |
5 | 5 | export function sanitizeGoogleAssistantFirstOrdering(messages: AgentMessage[]): AgentMessage[] { |
6 | 6 | const first = messages[0] as { role?: unknown; content?: unknown } | undefined; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ import { normalizeOptionalString } from "./string-coerce.js";
|
2 | 2 | |
3 | 3 | export const NODE_PRESENCE_ALIVE_EVENT = "node.presence.alive"; |
4 | 4 | |
5 | | -export const NODE_PRESENCE_ALIVE_REASONS = [ |
| 5 | +const NODE_PRESENCE_ALIVE_REASONS = [ |
6 | 6 | "background", |
7 | 7 | "silent_push", |
8 | 8 | "bg_app_refresh", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。