@lvce-editor/chat-debug-view 5.4.0 → 5.5.0

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.
@@ -1575,6 +1575,27 @@ const handleEventCategoryFilter = (state, value) => {
1575
1575
  return withPreservedSelection$1(state, nextState);
1576
1576
  };
1577
1577
 
1578
+ let workerRpc;
1579
+ const setWorkerRpc = value => {
1580
+ workerRpc = value;
1581
+ };
1582
+ const invoke = async (method, ...params) => {
1583
+ if (!workerRpc) {
1584
+ throw new Error('worker rpc is not initialized');
1585
+ }
1586
+ return workerRpc.invoke(method, ...params);
1587
+ };
1588
+
1589
+ const chatStorageWorkerClientDependencies = {
1590
+ invoke: invoke
1591
+ };
1592
+ const listChatViewEvents$1 = async sessionId => {
1593
+ return chatStorageWorkerClientDependencies.invoke('ChatStorage.listChatViewEvents', sessionId);
1594
+ };
1595
+ const loadSelectedEvent$1 = async (sessionId, eventId, type) => {
1596
+ return chatStorageWorkerClientDependencies.invoke('ChatStorage.loadSelectedEvent', sessionId, eventId, type);
1597
+ };
1598
+
1578
1599
  // cspell:ignore IDBP
1579
1600
 
1580
1601
  const startedEventType = 'tool-execution-started';
@@ -1915,6 +1936,7 @@ const openDatabase = async (databaseName, dataBaseVersion) => {
1915
1936
 
1916
1937
  const loadSelectedEventDependencies = {
1917
1938
  getEventDetailsBySessionIdAndEventId: getEventDetailsBySessionIdAndEventId,
1939
+ loadSelectedEventFromWorker: loadSelectedEvent$1,
1918
1940
  openDatabase: openDatabase
1919
1941
  };
1920
1942
  const loadSelectedEvent = async (databaseName, dataBaseVersion, eventStoreName, sessionId, sessionIdIndexName, eventId, type) => {
@@ -2493,6 +2515,7 @@ const isIndexedDbSupported = indexedDbSupportOverride => {
2493
2515
 
2494
2516
  const listChatViewEventsDependencies = {
2495
2517
  getEventsBySessionId: getEventsBySessionId,
2518
+ listChatViewEventsFromWorker: listChatViewEvents$1,
2496
2519
  openDatabase: openDatabase
2497
2520
  };
2498
2521
  const listChatViewEvents = async (sessionId, databaseName, dataBaseVersion, eventStoreName, sessionIdIndexName, indexedDbSupportOverride) => {
@@ -4938,9 +4961,10 @@ const commandMap = {
4938
4961
 
4939
4962
  const listen = async () => {
4940
4963
  registerCommands(commandMap);
4941
- await create$2({
4964
+ const rpc = await create$2({
4942
4965
  commandMap: commandMap
4943
4966
  });
4967
+ setWorkerRpc(rpc);
4944
4968
  };
4945
4969
 
4946
4970
  const main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/chat-debug-view",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Chat Debug View Worker",
5
5
  "repository": {
6
6
  "type": "git",