@copilotkit/runtime 0.0.0-feat-enable-setting-recursion-limit-20250428151824 → 0.0.0-feat-enable-setting-recursion-limit-20250429112631

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/CHANGELOG.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # @copilotkit/runtime
2
2
 
3
- ## 0.0.0-feat-enable-setting-recursion-limit-20250428151824
3
+ ## 0.0.0-feat-enable-setting-recursion-limit-20250429112631
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 1d2ae5a: - feat: enable setting langgraph config from ui
8
8
  - chore: document usage of new config
9
- - @copilotkit/shared@0.0.0-feat-enable-setting-recursion-limit-20250428151824
9
+ - @copilotkit/shared@0.0.0-feat-enable-setting-recursion-limit-20250429112631
10
10
 
11
11
  ## 1.8.9
12
12
 
@@ -2,7 +2,7 @@ import {
2
2
  getCommonConfig,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-UYOLJP2E.mjs";
5
+ } from "./chunk-7ILIEHVE.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -77,4 +77,4 @@ export {
77
77
  config,
78
78
  copilotRuntimeNextJSPagesRouterEndpoint
79
79
  };
80
- //# sourceMappingURL=chunk-UXFLLVRF.mjs.map
80
+ //# sourceMappingURL=chunk-5ZYWB2JT.mjs.map
@@ -2,7 +2,7 @@ import {
2
2
  copilotRuntimeNodeHttpEndpoint,
3
3
  getRuntimeInstanceTelemetryInfo,
4
4
  telemetry_client_default
5
- } from "./chunk-UYOLJP2E.mjs";
5
+ } from "./chunk-7ILIEHVE.mjs";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-FHD4JECV.mjs";
@@ -22,4 +22,4 @@ __name(copilotRuntimeNodeExpressEndpoint, "copilotRuntimeNodeExpressEndpoint");
22
22
  export {
23
23
  copilotRuntimeNodeExpressEndpoint
24
24
  };
25
- //# sourceMappingURL=chunk-RESUQNFX.mjs.map
25
+ //# sourceMappingURL=chunk-6GTTZNCX.mjs.map
@@ -1898,13 +1898,25 @@ async function streamEvents(controller, args) {
1898
1898
  if (explicitConfig.configurable) {
1899
1899
  filteredConfigurable = (schemaKeys == null ? void 0 : schemaKeys.config) ? filterObjectBySchemaKeys(explicitConfig == null ? void 0 : explicitConfig.configurable, schemaKeys == null ? void 0 : schemaKeys.config) : explicitConfig == null ? void 0 : explicitConfig.configurable;
1900
1900
  }
1901
- await client.assistants.update(assistantId, {
1902
- config: {
1903
- ...retrievedAssistant.config,
1904
- ...explicitConfig,
1905
- configurable: filteredConfigurable
1906
- }
1901
+ const newConfig = {
1902
+ ...retrievedAssistant.config,
1903
+ ...explicitConfig,
1904
+ configurable: filteredConfigurable
1905
+ };
1906
+ const isRecursionLimitSetToDefault = retrievedAssistant.config.recursion_limit == null && explicitConfig.recursion_limit === 25;
1907
+ const configsAreDifferent = JSON.stringify(newConfig) !== JSON.stringify(retrievedAssistant.config);
1908
+ const isOnlyRecursionLimitDifferent = isRecursionLimitSetToDefault && JSON.stringify({
1909
+ ...newConfig,
1910
+ recursion_limit: null
1911
+ }) === JSON.stringify({
1912
+ ...retrievedAssistant.config,
1913
+ recursion_limit: null
1907
1914
  });
1915
+ if (configsAreDifferent && !isOnlyRecursionLimitDifferent) {
1916
+ await client.assistants.update(assistantId, {
1917
+ config: newConfig
1918
+ });
1919
+ }
1908
1920
  }
1909
1921
  if (payload.input && (schemaKeys == null ? void 0 : schemaKeys.input)) {
1910
1922
  payload.input = filterObjectBySchemaKeys(payload.input, schemaKeys.input);
@@ -5060,4 +5072,4 @@ export {
5060
5072
  getCommonConfig,
5061
5073
  copilotRuntimeNodeHttpEndpoint
5062
5074
  };
5063
- //# sourceMappingURL=chunk-UYOLJP2E.mjs.map
5075
+ //# sourceMappingURL=chunk-7ILIEHVE.mjs.map