mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
refactor: remove bootstrap warning alias
This commit is contained in:
@@ -354,9 +354,6 @@ export function appendBootstrapPromptWarning(
|
||||
return prompt ? `${prompt}\n\n${warningBlock}` : warningBlock;
|
||||
}
|
||||
|
||||
/** @deprecated Use appendBootstrapPromptWarning. */
|
||||
export const prependBootstrapPromptWarning = appendBootstrapPromptWarning;
|
||||
|
||||
export function buildBootstrapTruncationReportMeta(params: {
|
||||
analysis: BootstrapBudgetAnalysis;
|
||||
warningMode: BootstrapPromptWarningMode;
|
||||
|
||||
@@ -7,7 +7,7 @@ import { sanitizeHostExecEnv } from "../../infra/host-env-security.js";
|
||||
import { enqueueSystemEvent as enqueueSystemEventImpl } from "../../infra/system-events.js";
|
||||
import { getProcessSupervisor as getProcessSupervisorImpl } from "../../process/supervisor/index.js";
|
||||
import { scopedHeartbeatWakeOptions } from "../../routing/session-key.js";
|
||||
import { prependBootstrapPromptWarning } from "../bootstrap-budget.js";
|
||||
import { appendBootstrapPromptWarning } from "../bootstrap-budget.js";
|
||||
import {
|
||||
createCliJsonlStreamingParser,
|
||||
extractCliErrorMessage,
|
||||
@@ -248,7 +248,7 @@ export async function executePreparedCliRun(
|
||||
? params.prompt
|
||||
: (context.openClawHistoryPrompt ?? params.prompt);
|
||||
let prompt = applyPluginTextReplacements(
|
||||
prependBootstrapPromptWarning(basePrompt, context.bootstrapPromptWarningLines, {
|
||||
appendBootstrapPromptWarning(basePrompt, context.bootstrapPromptWarningLines, {
|
||||
preserveExactPrompt: context.heartbeatPrompt,
|
||||
}),
|
||||
context.backendResolved.textTransforms?.input,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
analyzeBootstrapBudget,
|
||||
buildBootstrapInjectionStats,
|
||||
buildBootstrapPromptWarning,
|
||||
prependBootstrapPromptWarning,
|
||||
appendBootstrapPromptWarning,
|
||||
} from "../../bootstrap-budget.js";
|
||||
import { composeSystemPromptWithHookContext } from "./attempt.thread-helpers.js";
|
||||
|
||||
@@ -28,7 +28,7 @@ describe("runEmbeddedAttempt bootstrap warning prompt assembly", () => {
|
||||
analysis,
|
||||
mode: "once",
|
||||
});
|
||||
const promptWithWarning = prependBootstrapPromptWarning("hello", warning.lines);
|
||||
const promptWithWarning = appendBootstrapPromptWarning("hello", warning.lines);
|
||||
const systemPrompt = composeSystemPromptWithHookContext({
|
||||
baseSystemPrompt: promptWithWarning,
|
||||
prependSystemContext: "hook context",
|
||||
|
||||
@@ -58,7 +58,7 @@ import {
|
||||
buildBootstrapPromptWarning,
|
||||
buildBootstrapTruncationReportMeta,
|
||||
buildBootstrapInjectionStats,
|
||||
prependBootstrapPromptWarning,
|
||||
appendBootstrapPromptWarning,
|
||||
} from "../../bootstrap-budget.js";
|
||||
import {
|
||||
FULL_BOOTSTRAP_COMPLETED_CUSTOM_TYPE,
|
||||
@@ -2585,7 +2585,7 @@ export async function runEmbeddedAttempt(
|
||||
|
||||
// Run before_prompt_build hooks to allow plugins to inject prompt context.
|
||||
// Legacy compatibility: before_agent_start is also checked for context fields.
|
||||
let effectivePrompt = prependBootstrapPromptWarning(
|
||||
let effectivePrompt = appendBootstrapPromptWarning(
|
||||
params.prompt,
|
||||
bootstrapPromptWarning.lines,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user