@kaltura-sdk/avatars 1.21.2 → 1.21.3

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.
Files changed (2) hide show
  1. package/index.esm.js +4 -4
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -5,9 +5,9 @@ import { z as z$1 } from 'zod/mini';
5
5
  import { AlertIconEnum } from '@unisphere/notifications-core';
6
6
  import { initializeLogsCollector, EselfSession, MediaTrackState, sendLogs } from '@kaltura-sdk/rtc-avatar';
7
7
  import { produce } from 'immer';
8
+ import { loadToolYaml, executeClientToolCall, sendClientToolResponse } from '@local/genie-shared-utils';
8
9
  import * as yaml from 'js-yaml';
9
10
  import { ApplicationPageTypes, ApplicationEventTypes, AnalyticsBucket } from '@unisphere/runtime';
10
- import { executeClientToolCall, sendClientToolResponse } from '@local/genie-shared-utils';
11
11
 
12
12
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
13
 
@@ -18699,7 +18699,7 @@ class ChatBlocksCreator {
18699
18699
  let settings = {};
18700
18700
  if (typeof item.content === 'string') {
18701
18701
  try {
18702
- settings = yaml.load(item.content);
18702
+ settings = loadToolYaml(item.content);
18703
18703
  } catch (e) {
18704
18704
  this.logger.warn('Failed to parse shared tool block settings', {
18705
18705
  data: {
@@ -18781,7 +18781,7 @@ class ChatBlocksCreator {
18781
18781
  return this._buildToolBlock('error');
18782
18782
  }
18783
18783
  try {
18784
- this._streamedToolBlockData.settingsAsJson = yaml.load(this._streamedToolBlockData.settingsAsYaml);
18784
+ this._streamedToolBlockData.settingsAsJson = loadToolYaml(this._streamedToolBlockData.settingsAsYaml);
18785
18785
  } catch (e) {
18786
18786
  this.logger.warn('Failed to parse tool settings', {
18787
18787
  data: {
@@ -18805,7 +18805,7 @@ class ChatBlocksCreator {
18805
18805
  const lastLine = lines[lines.length - 1];
18806
18806
  const hasPartialString = lastLine.includes(': "') && !lastLine.includes(': ""') && !lastLine.endsWith('"'); // has a string value that is not valid empty and or closed
18807
18807
  const tolerantSettings = hasPartialString ? `${this._streamedToolBlockData.settingsAsYaml}"` : this._streamedToolBlockData.settingsAsYaml;
18808
- const json = yaml.load(tolerantSettings);
18808
+ const json = loadToolYaml(tolerantSettings);
18809
18809
  this._streamedToolBlockData.settingsAsJson = json;
18810
18810
  this._streamedToolBlockData.lastPartialUpdateTime = now;
18811
18811
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaltura-sdk/avatars",
3
- "version": "1.21.2",
3
+ "version": "1.21.3",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {