@superinterface/react 2.6.0 → 2.6.1
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 +0 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +0 -6
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +0 -6
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,21 +365,13 @@ import { infiniteQueryOptions } from "@tanstack/react-query";
|
|
|
365
365
|
var variableParams = function(param) {
|
|
366
366
|
var variables = param.variables, superinterfaceContext = param.superinterfaceContext;
|
|
367
367
|
var _superinterfaceContext_threadIdCookieOptions;
|
|
368
|
-
console.log({
|
|
369
|
-
variables: variables,
|
|
370
|
-
superinterfaceContext: superinterfaceContext
|
|
371
|
-
});
|
|
372
368
|
if (variables.threadId) return variables;
|
|
373
369
|
if (!variables.assistantId) return variables;
|
|
374
370
|
if (!((_superinterfaceContext_threadIdCookieOptions = superinterfaceContext.threadIdCookieOptions) === null || _superinterfaceContext_threadIdCookieOptions === void 0 ? void 0 : _superinterfaceContext_threadIdCookieOptions.get)) return variables;
|
|
375
|
-
console.log("using");
|
|
376
371
|
var threadId = superinterfaceContext.threadIdCookieOptions.get({
|
|
377
372
|
assistantId: variables.assistantId
|
|
378
373
|
});
|
|
379
374
|
if (!threadId) return variables;
|
|
380
|
-
console.log({
|
|
381
|
-
threadId: threadId
|
|
382
|
-
});
|
|
383
375
|
return _object_spread_props(_object_spread({}, variables), {
|
|
384
376
|
threadId: threadId
|
|
385
377
|
});
|
|
@@ -1641,16 +1633,10 @@ import { JSONParser } from "@streamparser/json-whatwg";
|
|
|
1641
1633
|
var ensure = function(param) {
|
|
1642
1634
|
var superinterfaceContext = param.superinterfaceContext, variables = param.variables, value = param.value;
|
|
1643
1635
|
var _superinterfaceContext_threadIdCookieOptions;
|
|
1644
|
-
console.log({
|
|
1645
|
-
value: value,
|
|
1646
|
-
variables: variables,
|
|
1647
|
-
superinterfaceContext: superinterfaceContext
|
|
1648
|
-
});
|
|
1649
1636
|
if (!((_superinterfaceContext_threadIdCookieOptions = superinterfaceContext.threadIdCookieOptions) === null || _superinterfaceContext_threadIdCookieOptions === void 0 ? void 0 : _superinterfaceContext_threadIdCookieOptions.set)) return;
|
|
1650
1637
|
if (value.value.event !== "thread.run.created") return;
|
|
1651
1638
|
if (variables.threadId) return;
|
|
1652
1639
|
if (!variables.assistantId) return;
|
|
1653
|
-
console.log("saving");
|
|
1654
1640
|
superinterfaceContext.threadIdCookieOptions.set({
|
|
1655
1641
|
assistantId: variables.assistantId,
|
|
1656
1642
|
threadId: value.value.data.thread_id
|
|
@@ -2013,21 +1999,13 @@ var handleResponse = function(param) {
|
|
|
2013
1999
|
var body = function(param) {
|
|
2014
2000
|
var variables = param.variables, superinterfaceContext = param.superinterfaceContext;
|
|
2015
2001
|
var _superinterfaceContext_threadIdCookieOptions;
|
|
2016
|
-
console.log({
|
|
2017
|
-
variables: variables,
|
|
2018
|
-
superinterfaceContext: superinterfaceContext
|
|
2019
|
-
});
|
|
2020
2002
|
if (variables.threadId) return variables;
|
|
2021
2003
|
if (!variables.assistantId) return variables;
|
|
2022
2004
|
if (!((_superinterfaceContext_threadIdCookieOptions = superinterfaceContext.threadIdCookieOptions) === null || _superinterfaceContext_threadIdCookieOptions === void 0 ? void 0 : _superinterfaceContext_threadIdCookieOptions.get)) return variables;
|
|
2023
|
-
console.log("using");
|
|
2024
2005
|
var threadId = superinterfaceContext.threadIdCookieOptions.get({
|
|
2025
2006
|
assistantId: variables.assistantId
|
|
2026
2007
|
});
|
|
2027
2008
|
if (!threadId) return variables;
|
|
2028
|
-
console.log({
|
|
2029
|
-
threadId: threadId
|
|
2030
|
-
});
|
|
2031
2009
|
return _object_spread_props(_object_spread({}, variables), {
|
|
2032
2010
|
threadId: threadId
|
|
2033
2011
|
});
|