@yeaft/webchat-agent 1.0.468 → 1.0.470
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/package.json
CHANGED
package/yeaft/web-bridge.js
CHANGED
|
@@ -175,6 +175,19 @@ function applyLiveLanguage(language) {
|
|
|
175
175
|
try { session?.engine?.setLanguage?.(language); } catch { /* best-effort */ }
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
/**
|
|
179
|
+
* Apply an Agent-level Dream toggle to an already loaded runtime.
|
|
180
|
+
* This must never bootstrap a Session: config.json is the authoritative commit,
|
|
181
|
+
* while the live scheduler update is only a best-effort cache refresh.
|
|
182
|
+
*/
|
|
183
|
+
export function setLiveDreamEnabled(enabled) {
|
|
184
|
+
const next = enabled !== false;
|
|
185
|
+
if (session?.config && typeof session.config === 'object') {
|
|
186
|
+
session.config.dream = { ...(session.config.dream || {}), enabled: next };
|
|
187
|
+
}
|
|
188
|
+
session?.dreamScheduler?.setEnabled?.(next);
|
|
189
|
+
}
|
|
190
|
+
|
|
178
191
|
function modelRefIdentity(value) {
|
|
179
192
|
const text = String(value || '');
|
|
180
193
|
const slash = text.indexOf('/');
|