@yeaft/webchat-agent 1.0.82 → 1.0.83
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.
- package/package.json +1 -1
- package/yeaft/web-bridge.js +13 -5
package/package.json
CHANGED
package/yeaft/web-bridge.js
CHANGED
|
@@ -1190,6 +1190,12 @@ export function __testGroupHistory(sessionId) {
|
|
|
1190
1190
|
return getOrCreateSessionHistory(sessionId);
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
+
export function __testResolveVpEffectiveConfig(sessionId) {
|
|
1194
|
+
if (!session) return null;
|
|
1195
|
+
const sessionConfigRoot = ctx.CONFIG?.yeaftDir || session.yeaftDir;
|
|
1196
|
+
return resolveSessionConfig(session.config, loadSessionConfig(sessionConfigRoot, sessionId));
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1193
1199
|
/**
|
|
1194
1200
|
* Test-only: install a minimal `session` so `hydrateGroupHistory` can
|
|
1195
1201
|
* read from a real `ConversationStore`. Pass `null` to clear.
|
|
@@ -1293,11 +1299,13 @@ function getOrCreateVpEngine(sessionId, vpId, threadId = 'main') {
|
|
|
1293
1299
|
let eng = vpEngines.get(key);
|
|
1294
1300
|
if (eng) return eng;
|
|
1295
1301
|
if (!session) throw new Error('getOrCreateVpEngine: session not loaded');
|
|
1296
|
-
// Per-
|
|
1297
|
-
// session's user-level config when no override is set.
|
|
1298
|
-
//
|
|
1299
|
-
|
|
1300
|
-
|
|
1302
|
+
// Per-session config overlay (v1: model only). Falls back to the
|
|
1303
|
+
// session's user-level config when no override is set. Prefer the agent-local
|
|
1304
|
+
// config root: sessionConfigPath() resolves registered workDir-backed
|
|
1305
|
+
// sessions from there, while still allowing a later agent-local session in
|
|
1306
|
+
// the same bridge runtime to read its own override after a workDir-first boot.
|
|
1307
|
+
const sessionConfigRoot = ctx.CONFIG?.yeaftDir || session.yeaftDir;
|
|
1308
|
+
const groupCfg = loadSessionConfig(sessionConfigRoot, sessionId);
|
|
1301
1309
|
const effectiveConfig = resolveSessionConfig(session.config, groupCfg);
|
|
1302
1310
|
eng = new Engine({
|
|
1303
1311
|
adapter: session.adapter,
|