refactor: remove history limit alias · openclaw/openclaw@db5f96c
steipete
·
2026-05-03
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -488,7 +488,7 @@ export async function loadCompactHooksHarness(): Promise<{
|
488 | 488 | })); |
489 | 489 | |
490 | 490 | vi.doMock("./history.js", () => ({ |
491 | | -getDmHistoryLimitFromSessionKey: vi.fn(() => undefined), |
| 491 | +getHistoryLimitFromSessionKey: vi.fn(() => undefined), |
492 | 492 | limitHistoryTurns: vi.fn((msgs: unknown[]) => msgs.slice(0, 2)), |
493 | 493 | })); |
494 | 494 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -131,7 +131,7 @@ import {
|
131 | 131 | import { applyFinalEffectiveToolPolicy } from "./effective-tool-policy.js"; |
132 | 132 | import { buildEmbeddedExtensionFactories } from "./extensions.js"; |
133 | 133 | import { applyExtraParamsToAgent } from "./extra-params.js"; |
134 | | -import { getDmHistoryLimitFromSessionKey, limitHistoryTurns } from "./history.js"; |
| 134 | +import { getHistoryLimitFromSessionKey, limitHistoryTurns } from "./history.js"; |
135 | 135 | import { log } from "./logger.js"; |
136 | 136 | import { hardenManualCompactionBoundary } from "./manual-compaction-boundary.js"; |
137 | 137 | import { buildEmbeddedMessageActionDiscoveryInput } from "./message-action-discovery-input.js"; |
@@ -1096,7 +1096,7 @@ async function compactEmbeddedPiSessionDirectOnce(
|
1096 | 1096 | const originalMessages = session.messages.slice(); |
1097 | 1097 | const truncated = limitHistoryTurns( |
1098 | 1098 | session.messages, |
1099 | | -getDmHistoryLimitFromSessionKey(params.sessionKey, params.config), |
| 1099 | +getHistoryLimitFromSessionKey(params.sessionKey, params.config), |
1100 | 1100 | ); |
1101 | 1101 | // Re-run tool_use/tool_result pairing repair after truncation, since |
1102 | 1102 | // limitHistoryTurns can orphan tool_result blocks by removing the |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。