@kaltura-sdk/avatars 1.21.3-hotfix.0 → 1.21.4
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/index.esm.js +4 -4
- 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
|
|
|
@@ -18711,7 +18711,7 @@ class ChatBlocksCreator {
|
|
|
18711
18711
|
let settings = {};
|
|
18712
18712
|
if (typeof item.content === 'string') {
|
|
18713
18713
|
try {
|
|
18714
|
-
settings =
|
|
18714
|
+
settings = loadToolYaml(item.content);
|
|
18715
18715
|
} catch (e) {
|
|
18716
18716
|
this.logger.warn('Failed to parse shared tool block settings', {
|
|
18717
18717
|
data: {
|
|
@@ -18793,7 +18793,7 @@ class ChatBlocksCreator {
|
|
|
18793
18793
|
return this._buildToolBlock('error');
|
|
18794
18794
|
}
|
|
18795
18795
|
try {
|
|
18796
|
-
this._streamedToolBlockData.settingsAsJson =
|
|
18796
|
+
this._streamedToolBlockData.settingsAsJson = loadToolYaml(this._streamedToolBlockData.settingsAsYaml);
|
|
18797
18797
|
} catch (e) {
|
|
18798
18798
|
this.logger.warn('Failed to parse tool settings', {
|
|
18799
18799
|
data: {
|
|
@@ -18817,7 +18817,7 @@ class ChatBlocksCreator {
|
|
|
18817
18817
|
const lastLine = lines[lines.length - 1];
|
|
18818
18818
|
const hasPartialString = lastLine.includes(': "') && !lastLine.includes(': ""') && !lastLine.endsWith('"'); // has a string value that is not valid empty and or closed
|
|
18819
18819
|
const tolerantSettings = hasPartialString ? `${this._streamedToolBlockData.settingsAsYaml}"` : this._streamedToolBlockData.settingsAsYaml;
|
|
18820
|
-
const json =
|
|
18820
|
+
const json = loadToolYaml(tolerantSettings);
|
|
18821
18821
|
this._streamedToolBlockData.settingsAsJson = json;
|
|
18822
18822
|
this._streamedToolBlockData.lastPartialUpdateTime = now;
|
|
18823
18823
|
} catch (e) {
|