refactor: hide auto reply internals

This commit is contained in:
Peter Steinberger
2026-05-02 06:51:46 +01:00
parent ee8f47eda7
commit fdbb2fdbc7
8 changed files with 11 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ const DEFAULT_ACP_HIDDEN_BOUNDARY_SEPARATOR_LIVE = "space";
const DEFAULT_ACP_MAX_OUTPUT_CHARS = 24_000;
const DEFAULT_ACP_MAX_SESSION_UPDATE_CHARS = 320;
export const ACP_TAG_VISIBILITY_DEFAULTS: Record<AcpSessionUpdateTag, boolean> = {
const ACP_TAG_VISIBILITY_DEFAULTS: Record<AcpSessionUpdateTag, boolean> = {
agent_message_chunk: true,
tool_call: false,
tool_call_update: false,

View File

@@ -98,7 +98,7 @@ export function setAgentRunnerMemoryTestDeps(overrides?: Partial<typeof memoryDe
});
}
export function estimatePromptTokensForMemoryFlush(prompt?: string): number | undefined {
function estimatePromptTokensForMemoryFlush(prompt?: string): number | undefined {
const trimmed = normalizeOptionalString(prompt);
if (!trimmed) {
return undefined;
@@ -111,7 +111,7 @@ export function estimatePromptTokensForMemoryFlush(prompt?: string): number | un
return Math.ceil(tokens);
}
export function resolveEffectivePromptTokens(
function resolveEffectivePromptTokens(
basePromptTokens?: number,
lastOutputTokens?: number,
promptTokenEstimate?: number,
@@ -124,7 +124,7 @@ export function resolveEffectivePromptTokens(
return base + output + estimate;
}
export function resolveMemoryFlushModelFallbackOptions(
function resolveMemoryFlushModelFallbackOptions(
run: FollowupRun["run"],
model?: string,
configOverride: FollowupRun["run"]["config"] = run.config,

View File

@@ -2,7 +2,7 @@ import { loadCronStore, resolveCronStorePath } from "../../cron/store.js";
import { normalizeLowercaseStringOrEmpty } from "../../shared/string-coerce.js";
import type { ReplyPayload } from "../types.js";
export const UNSCHEDULED_REMINDER_NOTE =
const UNSCHEDULED_REMINDER_NOTE =
"Note: I did not schedule a reminder in this turn, so this will not trigger automatically.";
const REMINDER_COMMITMENT_PATTERNS: RegExp[] = [

View File

@@ -189,7 +189,7 @@ export function buildEmbeddedRunBaseParams(
});
}
export function buildEmbeddedContextFromTemplate(params: {
function buildEmbeddedContextFromTemplate(params: {
run: FollowupRun["run"];
sessionCtx: TemplateContext;
hasRepliedRef: { value: boolean } | undefined;
@@ -229,7 +229,7 @@ function normalizeMemberRoleIds(value: TemplateContext["MemberRoleIds"]): string
return roles.length > 0 ? roles : undefined;
}
export function buildTemplateSenderContext(sessionCtx: TemplateContext) {
function buildTemplateSenderContext(sessionCtx: TemplateContext) {
return {
senderId: normalizeOptionalString(sessionCtx.SenderId),
senderName: normalizeOptionalString(sessionCtx.SenderName),

View File

@@ -184,7 +184,7 @@ export function resolveBlockStreamingChunking(
};
}
export function resolveBlockStreamingCoalescing(
function resolveBlockStreamingCoalescing(
cfg: OpenClawConfig | undefined,
provider?: string,
accountId?: string | null,

View File

@@ -10,7 +10,7 @@ export type ParsedSlashCommand =
| { ok: true; action: string; args: string }
| { ok: false; message: string };
export function parseSlashCommandActionArgs(raw: string, slash: string): SlashCommandParseResult {
function parseSlashCommandActionArgs(raw: string, slash: string): SlashCommandParseResult {
const trimmed = raw.trim();
const slashLower = normalizeLowercaseStringOrEmpty(slash);
if (!normalizeLowercaseStringOrEmpty(trimmed).startsWith(slashLower)) {

View File

@@ -1,4 +1,4 @@
export const DEFAULT_PENDING_TOOL_DRAIN_IDLE_TIMEOUT_MS = 30_000;
const DEFAULT_PENDING_TOOL_DRAIN_IDLE_TIMEOUT_MS = 30_000;
export type PendingToolTaskDrainResult =
| { kind: "settled" }

View File

@@ -3,7 +3,7 @@ import { buildInboundMediaNote } from "../media-note.js";
import type { MsgContext, TemplateContext } from "../templating.js";
import { appendUntrustedContext } from "./untrusted-context.js";
export const REPLY_MEDIA_HINT =
const REPLY_MEDIA_HINT =
"To send an image back, prefer the message tool (media/path/filePath). If you must inline, use MEDIA:https://example.com/image.jpg (spaces ok, quote if needed) or a safe relative path like MEDIA:./image.jpg. Absolute and ~ paths only work when they stay inside your allowed file-read boundary; host file:// URLs are blocked. Keep caption in the text body.";
export function buildReplyPromptBodies(params: {