@yeaft/webchat-agent 1.0.71 → 1.0.72
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/vp/vp-bridge.js +5 -0
package/package.json
CHANGED
package/yeaft/vp/vp-bridge.js
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
import { defaultRegistry } from './registry.js';
|
|
25
25
|
import { VpLoader } from './vp-loader.js';
|
|
26
|
+
import { seedDefaultVps } from './seed-defaults.js';
|
|
27
|
+
import { topUpDefaultVps } from './seed-topup.js';
|
|
26
28
|
import { STOCK_VP_IDS } from './stock-ids.js';
|
|
27
29
|
|
|
28
30
|
/** Process-singleton VpLoader; lazily started on first subscribe. */
|
|
@@ -170,6 +172,9 @@ function ensureLoader(registry = defaultRegistry, options = {}) {
|
|
|
170
172
|
captureState(registry);
|
|
171
173
|
return { loader: null, fresh: true };
|
|
172
174
|
}
|
|
175
|
+
const seedDir = desiredDir || undefined;
|
|
176
|
+
try { seedDefaultVps(seedDir); } catch { /* best-effort; subscribe must not crash */ }
|
|
177
|
+
try { topUpDefaultVps(seedDir); } catch { /* best-effort; subscribe must not crash */ }
|
|
173
178
|
try {
|
|
174
179
|
_loader = new VpLoader({
|
|
175
180
|
...(desiredDir ? { dir: desiredDir } : {}),
|