fix: preserve normalization and ACP fast mode contracts

This commit is contained in:
Vincent Koc 2026-06-21 22:29:47 +08:00
parent 20aec98554
commit 9509aa063c
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -2,5 +2,5 @@
export * from "./number-coercion.js";
export * from "./record-coerce.js";
export * from "@openclaw/normalization-core/string-coerce";
export * from "./string-coerce.js";
export * from "./string-normalization.js";

View file

@ -53,6 +53,7 @@ export type GatewaySessionPresentationRow = Pick<
| "updatedAt"
| "thinkingLevel"
| "fastMode"
| "effectiveFastMode"
| "modelProvider"
| "model"
| "thinkingLevels"
@ -163,7 +164,7 @@ export function buildSessionPresentation(params: {
...BASE_THINKING_LEVELS,
];
const currentModeId = normalizeOptionalString(row.thinkingLevel) || "adaptive";
const currentFastMode = normalizeFastMode(row.fastMode) ?? false;
const currentFastMode = normalizeFastMode(row.effectiveFastMode ?? row.fastMode) ?? false;
if (!availableLevelIds.includes(currentModeId)) {
availableLevelIds.push(currentModeId);
}