@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.
- 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
|
|
|
@@ -18699,7 +18699,7 @@ class ChatBlocksCreator {
|
|
|
18699
18699
|
let settings = {};
|
|
18700
18700
|
if (typeof item.content === 'string') {
|
|
18701
18701
|
try {
|
|
18702
|
-
settings =
|
|
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 =
|
|
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 =
|
|
18808
|
+
const json = loadToolYaml(tolerantSettings);
|
|
18809
18809
|
this._streamedToolBlockData.settingsAsJson = json;
|
|
18810
18810
|
this._streamedToolBlockData.lastPartialUpdateTime = now;
|
|
18811
18811
|
} catch (e) {
|