@aomi-labs/react 0.3.11 → 0.3.12
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/dist/index.cjs +20 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1155,14 +1155,28 @@ function useRuntimeOrchestrator(aomiClient, options) {
|
|
|
1155
1155
|
(threadId) => {
|
|
1156
1156
|
var _a, _b, _c, _d, _e;
|
|
1157
1157
|
const manager = sessionManagerRef.current;
|
|
1158
|
+
const nextApp = options.getApp();
|
|
1159
|
+
const nextPublicKey = (_a = options.getPublicKey) == null ? void 0 : _a.call(options);
|
|
1160
|
+
const nextApiKey = (_c = (_b = options.getApiKey) == null ? void 0 : _b.call(options)) != null ? _c : void 0;
|
|
1161
|
+
const nextClientId = (_d = options.getClientId) == null ? void 0 : _d.call(options);
|
|
1162
|
+
const nextUserState = (_e = options.getUserState) == null ? void 0 : _e.call(options);
|
|
1158
1163
|
const existing = manager.get(threadId);
|
|
1159
|
-
if (existing)
|
|
1164
|
+
if (existing) {
|
|
1165
|
+
existing.syncRuntimeOptions({
|
|
1166
|
+
app: nextApp,
|
|
1167
|
+
publicKey: nextPublicKey,
|
|
1168
|
+
apiKey: nextApiKey,
|
|
1169
|
+
clientId: nextClientId,
|
|
1170
|
+
userState: nextUserState
|
|
1171
|
+
});
|
|
1172
|
+
return existing;
|
|
1173
|
+
}
|
|
1160
1174
|
const session = manager.getOrCreate(threadId, {
|
|
1161
|
-
app:
|
|
1162
|
-
publicKey:
|
|
1163
|
-
apiKey:
|
|
1164
|
-
clientId:
|
|
1165
|
-
userState:
|
|
1175
|
+
app: nextApp,
|
|
1176
|
+
publicKey: nextPublicKey,
|
|
1177
|
+
apiKey: nextApiKey,
|
|
1178
|
+
clientId: nextClientId,
|
|
1179
|
+
userState: nextUserState
|
|
1166
1180
|
});
|
|
1167
1181
|
const cleanups = [];
|
|
1168
1182
|
cleanups.push(
|