feat: deepen luker host integration

This commit is contained in:
Youzini-afk
2026-04-15 21:19:36 +08:00
parent 1251938fc6
commit 359a2a07b7
12 changed files with 1637 additions and 59 deletions

View File

@@ -119,10 +119,19 @@ function isVerboseRuntimeDebugEnabled() {
return globalThis.__stBmeVerboseDebug === true;
}
function isLightweightHostModeEnabled() {
return globalThis.__stBmeLightweightHostMode === true;
}
function buildPreviewText(value, maxChars = 240) {
const effectiveMaxChars = isLightweightHostModeEnabled()
? Math.min(maxChars, 160)
: maxChars;
const text = String(value ?? "").replace(/\s+/g, " ").trim();
if (!text) return "";
return text.length > maxChars ? `${text.slice(0, maxChars)}...` : text;
return text.length > effectiveMaxChars
? `${text.slice(0, effectiveMaxChars)}...`
: text;
}
function summarizeExecutionMessages(messages = []) {