@trops/dash-core 0.1.503 → 0.1.504
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/dist/electron/index.js +141 -266
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +1 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -142,17 +142,10 @@ const LAYOUT_LIST$1 = "layout-list";
|
|
|
142
142
|
const LAYOUT_LIST_COMPLETE = "layout-list-complete";
|
|
143
143
|
const LAYOUT_LIST_ERROR = "layout-list-error";
|
|
144
144
|
|
|
145
|
-
const LAYOUT_SAVE$1 = "layout-save";
|
|
146
|
-
const LAYOUT_SAVE_COMPLETE = "layout-save-complete";
|
|
147
|
-
const LAYOUT_SAVE_ERROR = "layout-save-error";
|
|
148
|
-
|
|
149
145
|
var layoutEvents$1 = {
|
|
150
146
|
LAYOUT_LIST: LAYOUT_LIST$1,
|
|
151
147
|
LAYOUT_LIST_COMPLETE,
|
|
152
148
|
LAYOUT_LIST_ERROR,
|
|
153
|
-
LAYOUT_SAVE: LAYOUT_SAVE$1,
|
|
154
|
-
LAYOUT_SAVE_COMPLETE,
|
|
155
|
-
LAYOUT_SAVE_ERROR,
|
|
156
149
|
};
|
|
157
150
|
|
|
158
151
|
/**
|
|
@@ -611,24 +604,6 @@ var llmEvents$1 = {
|
|
|
611
604
|
LLM_CLI_END_SESSION: LLM_CLI_END_SESSION$1,
|
|
612
605
|
};
|
|
613
606
|
|
|
614
|
-
/**
|
|
615
|
-
* Event Constants File - Client Cache Events
|
|
616
|
-
*
|
|
617
|
-
* This file contains event constants for client cache management IPC communication.
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
const CLIENT_CACHE_INVALIDATE$1 = "client-cache-invalidate";
|
|
621
|
-
const CLIENT_CACHE_INVALIDATE_ALL$1 = "client-cache-invalidate-all";
|
|
622
|
-
const RESPONSE_CACHE_CLEAR$1 = "response-cache-clear";
|
|
623
|
-
const RESPONSE_CACHE_STATS$1 = "response-cache-stats";
|
|
624
|
-
|
|
625
|
-
var clientCacheEvents$1 = {
|
|
626
|
-
CLIENT_CACHE_INVALIDATE: CLIENT_CACHE_INVALIDATE$1,
|
|
627
|
-
CLIENT_CACHE_INVALIDATE_ALL: CLIENT_CACHE_INVALIDATE_ALL$1,
|
|
628
|
-
RESPONSE_CACHE_CLEAR: RESPONSE_CACHE_CLEAR$1,
|
|
629
|
-
RESPONSE_CACHE_STATS: RESPONSE_CACHE_STATS$1,
|
|
630
|
-
};
|
|
631
|
-
|
|
632
607
|
/**
|
|
633
608
|
* Dashboard Config Events
|
|
634
609
|
*
|
|
@@ -941,7 +916,6 @@ const algoliaEvents = algoliaEvents$1;
|
|
|
941
916
|
const menuItemEvents = menuItemEvents$1;
|
|
942
917
|
const openaiEvents = openaiEvents$1;
|
|
943
918
|
const llmEvents = llmEvents$1;
|
|
944
|
-
const clientCacheEvents = clientCacheEvents$1;
|
|
945
919
|
const dashboardConfigEvents = requireDashboardConfigEvents();
|
|
946
920
|
const dashboardRatingsEvents = dashboardRatingsEvents$1;
|
|
947
921
|
const registryAuthEvents = registryAuthEvents$1;
|
|
@@ -963,7 +937,6 @@ const publicEvents = {
|
|
|
963
937
|
*/
|
|
964
938
|
const API_GROUPS = {
|
|
965
939
|
algolia: Object.values(algoliaEvents),
|
|
966
|
-
cache: Object.values(clientCacheEvents),
|
|
967
940
|
"dashboard-config": Object.values(dashboardConfigEvents),
|
|
968
941
|
"dashboard-ratings": Object.values(dashboardRatingsEvents),
|
|
969
942
|
data: Object.values(dataEvents),
|
|
@@ -1004,7 +977,6 @@ var events$8 = {
|
|
|
1004
977
|
...menuItemEvents,
|
|
1005
978
|
...openaiEvents,
|
|
1006
979
|
...llmEvents,
|
|
1007
|
-
...clientCacheEvents,
|
|
1008
980
|
...dashboardConfigEvents,
|
|
1009
981
|
...dashboardRatingsEvents,
|
|
1010
982
|
...registryAuthEvents,
|
|
@@ -1085,7 +1057,7 @@ var secureStoreController$1 = {
|
|
|
1085
1057
|
const path$m = require$$1$1;
|
|
1086
1058
|
const {
|
|
1087
1059
|
readFileSync,
|
|
1088
|
-
writeFileSync: writeFileSync$
|
|
1060
|
+
writeFileSync: writeFileSync$3,
|
|
1089
1061
|
existsSync,
|
|
1090
1062
|
mkdirSync,
|
|
1091
1063
|
openSync,
|
|
@@ -1176,13 +1148,13 @@ function getFileContents$8(filepath, defaultReturn = []) {
|
|
|
1176
1148
|
|
|
1177
1149
|
// Reinitialize with default content
|
|
1178
1150
|
fileContentsArray = defaultReturn;
|
|
1179
|
-
writeFileSync$
|
|
1151
|
+
writeFileSync$3(filepath, JSON.stringify(defaultReturn, null, 2));
|
|
1180
1152
|
console.log(`[File] Successfully reinitialized: ${filepath}`);
|
|
1181
1153
|
}
|
|
1182
1154
|
} else {
|
|
1183
1155
|
// we should make the file with default content
|
|
1184
1156
|
closeSync(openSync(filepath, "w"));
|
|
1185
|
-
writeFileSync$
|
|
1157
|
+
writeFileSync$3(filepath, JSON.stringify(defaultReturn, null, 2));
|
|
1186
1158
|
}
|
|
1187
1159
|
|
|
1188
1160
|
return fileContentsArray;
|
|
@@ -1195,7 +1167,7 @@ function getFileContents$8(filepath, defaultReturn = []) {
|
|
|
1195
1167
|
function writeToFile$3(filename, data) {
|
|
1196
1168
|
try {
|
|
1197
1169
|
// write the new pages configuration back to the file
|
|
1198
|
-
return writeFileSync$
|
|
1170
|
+
return writeFileSync$3(filename, data);
|
|
1199
1171
|
} catch (e) {
|
|
1200
1172
|
return false;
|
|
1201
1173
|
}
|
|
@@ -1234,7 +1206,7 @@ var file = {
|
|
|
1234
1206
|
|
|
1235
1207
|
const { app: app$e } = require$$0$1;
|
|
1236
1208
|
const path$l = require$$1$1;
|
|
1237
|
-
const { writeFileSync: writeFileSync$
|
|
1209
|
+
const { writeFileSync: writeFileSync$2 } = require$$0$2;
|
|
1238
1210
|
const { getFileContents: getFileContents$7 } = file;
|
|
1239
1211
|
|
|
1240
1212
|
const configFilename$5 = "workspaces.json";
|
|
@@ -1306,7 +1278,7 @@ const workspaceController$3 = {
|
|
|
1306
1278
|
}
|
|
1307
1279
|
|
|
1308
1280
|
// write the new pages configuration back to the file
|
|
1309
|
-
writeFileSync$
|
|
1281
|
+
writeFileSync$2(filename, JSON.stringify(workspacesArray, null, 2));
|
|
1310
1282
|
|
|
1311
1283
|
console.log("[workspaceController] Workspace saved successfully");
|
|
1312
1284
|
|
|
@@ -1349,7 +1321,7 @@ const workspaceController$3 = {
|
|
|
1349
1321
|
}
|
|
1350
1322
|
|
|
1351
1323
|
// write the updated workspaces configuration back to the file
|
|
1352
|
-
writeFileSync$
|
|
1324
|
+
writeFileSync$2(filename, JSON.stringify(workspacesArray, null, 2));
|
|
1353
1325
|
|
|
1354
1326
|
console.log("[workspaceController] Menu items saved successfully");
|
|
1355
1327
|
|
|
@@ -1390,7 +1362,7 @@ const workspaceController$3 = {
|
|
|
1390
1362
|
(workspace) => workspace.id !== workspaceId,
|
|
1391
1363
|
);
|
|
1392
1364
|
|
|
1393
|
-
writeFileSync$
|
|
1365
|
+
writeFileSync$2(filename, JSON.stringify(filtered, null, 2));
|
|
1394
1366
|
|
|
1395
1367
|
console.log(
|
|
1396
1368
|
`[workspaceController] Workspace ${workspaceId} deleted successfully`,
|
|
@@ -1486,7 +1458,7 @@ var workspaceController_1 = workspaceController$3;
|
|
|
1486
1458
|
|
|
1487
1459
|
const { app: app$d } = require$$0$1;
|
|
1488
1460
|
const path$k = require$$1$1;
|
|
1489
|
-
const { writeFileSync: writeFileSync$
|
|
1461
|
+
const { writeFileSync: writeFileSync$1 } = require$$0$2;
|
|
1490
1462
|
const { getFileContents: getFileContents$6 } = file;
|
|
1491
1463
|
|
|
1492
1464
|
const configFilename$4 = "themes.json";
|
|
@@ -1521,7 +1493,7 @@ const themeController$5 = {
|
|
|
1521
1493
|
data[name] = obj;
|
|
1522
1494
|
|
|
1523
1495
|
// write the new pages configuration back to the file
|
|
1524
|
-
writeFileSync$
|
|
1496
|
+
writeFileSync$1(filename, JSON.stringify(data, null, 2));
|
|
1525
1497
|
|
|
1526
1498
|
console.log("[themeController] Theme saved successfully");
|
|
1527
1499
|
|
|
@@ -1603,7 +1575,7 @@ const themeController$5 = {
|
|
|
1603
1575
|
|
|
1604
1576
|
if (themeKey in data) {
|
|
1605
1577
|
delete data[themeKey];
|
|
1606
|
-
writeFileSync$
|
|
1578
|
+
writeFileSync$1(filename, JSON.stringify(data, null, 2));
|
|
1607
1579
|
}
|
|
1608
1580
|
|
|
1609
1581
|
console.log("[themeController] Theme deleted successfully:", themeKey);
|
|
@@ -4788,7 +4760,6 @@ function requireProviderController () {
|
|
|
4788
4760
|
|
|
4789
4761
|
const { app: app$8 } = require$$0$1;
|
|
4790
4762
|
const path$f = require$$1$1;
|
|
4791
|
-
const { writeFileSync: writeFileSync$1 } = require$$0$2;
|
|
4792
4763
|
const events$4 = events$8;
|
|
4793
4764
|
const { getFileContents: getFileContents$3 } = file;
|
|
4794
4765
|
|
|
@@ -4796,42 +4767,6 @@ const configFilename$2 = "layouts.json";
|
|
|
4796
4767
|
const appName$3 = "Dashboard";
|
|
4797
4768
|
|
|
4798
4769
|
const layoutController$1 = {
|
|
4799
|
-
/**
|
|
4800
|
-
* saveLayout
|
|
4801
|
-
* Create a workspace from a json configuration object (no template)
|
|
4802
|
-
*
|
|
4803
|
-
* @param {BrowserWindow} win the main window
|
|
4804
|
-
* @param {string} appId the application id
|
|
4805
|
-
* @param {object} pageObject the page config object
|
|
4806
|
-
*/
|
|
4807
|
-
saveLayoutForApplication: (win, appId, layoutObject) => {
|
|
4808
|
-
try {
|
|
4809
|
-
// filename to the pages file (live pages)
|
|
4810
|
-
const filename = path$f.join(
|
|
4811
|
-
app$8.getPath("userData"),
|
|
4812
|
-
appName$3,
|
|
4813
|
-
appId,
|
|
4814
|
-
configFilename$2,
|
|
4815
|
-
);
|
|
4816
|
-
const layoutsArray = getFileContents$3(filename);
|
|
4817
|
-
|
|
4818
|
-
// add the pageObject to the pages file
|
|
4819
|
-
layoutsArray.push(layoutObject);
|
|
4820
|
-
|
|
4821
|
-
// write the new pages configuration back to the file
|
|
4822
|
-
writeFileSync$1(filename, JSON.stringify(layoutsArray, null, 2));
|
|
4823
|
-
|
|
4824
|
-
// message the renderer
|
|
4825
|
-
win.webContents.send(events$4.LAYOUT_SAVE_COMPLETE, {
|
|
4826
|
-
layouts: layoutsArray,
|
|
4827
|
-
});
|
|
4828
|
-
} catch (e) {
|
|
4829
|
-
win.webContents.send(events$4.LAYOUT_SAVE_ERROR, {
|
|
4830
|
-
error: e.message,
|
|
4831
|
-
});
|
|
4832
|
-
}
|
|
4833
|
-
},
|
|
4834
|
-
|
|
4835
4770
|
/**
|
|
4836
4771
|
*
|
|
4837
4772
|
*
|
|
@@ -62631,7 +62566,7 @@ var controller = {
|
|
|
62631
62566
|
mcpDashServerController: mcpDashServerController$2,
|
|
62632
62567
|
};
|
|
62633
62568
|
|
|
62634
|
-
const { ipcRenderer: ipcRenderer$
|
|
62569
|
+
const { ipcRenderer: ipcRenderer$p } = require$$0$1;
|
|
62635
62570
|
const { SECURE_STORE_ENCRYPTION_CHECK } = events$8;
|
|
62636
62571
|
/**
|
|
62637
62572
|
* secureStoreApi
|
|
@@ -62653,7 +62588,7 @@ const { SECURE_STORE_ENCRYPTION_CHECK } = events$8;
|
|
|
62653
62588
|
*/
|
|
62654
62589
|
const secureStoreApi$2 = {
|
|
62655
62590
|
isEncryptionAvailable: () =>
|
|
62656
|
-
ipcRenderer$
|
|
62591
|
+
ipcRenderer$p.invoke(SECURE_STORE_ENCRYPTION_CHECK, {}),
|
|
62657
62592
|
};
|
|
62658
62593
|
|
|
62659
62594
|
var secureStoreApi_1 = secureStoreApi$2;
|
|
@@ -62664,7 +62599,7 @@ var secureStoreApi_1 = secureStoreApi$2;
|
|
|
62664
62599
|
* Handle the workspace configuration file
|
|
62665
62600
|
*/
|
|
62666
62601
|
|
|
62667
|
-
const { ipcRenderer: ipcRenderer$
|
|
62602
|
+
const { ipcRenderer: ipcRenderer$o } = require$$0$1;
|
|
62668
62603
|
const {
|
|
62669
62604
|
WORKSPACE_LIST,
|
|
62670
62605
|
WORKSPACE_SAVE,
|
|
@@ -62681,7 +62616,7 @@ const workspaceApi$2 = {
|
|
|
62681
62616
|
*/
|
|
62682
62617
|
listWorkspacesForApplication: (appId) => {
|
|
62683
62618
|
console.log("listWorkspacesForApplication called with appId:", appId);
|
|
62684
|
-
return ipcRenderer$
|
|
62619
|
+
return ipcRenderer$o.invoke(WORKSPACE_LIST, { appId });
|
|
62685
62620
|
},
|
|
62686
62621
|
|
|
62687
62622
|
/**
|
|
@@ -62692,7 +62627,7 @@ const workspaceApi$2 = {
|
|
|
62692
62627
|
* @returns
|
|
62693
62628
|
*/
|
|
62694
62629
|
saveWorkspaceForApplication: (appId, data) =>
|
|
62695
|
-
ipcRenderer$
|
|
62630
|
+
ipcRenderer$o.invoke(WORKSPACE_SAVE, { appId, data }),
|
|
62696
62631
|
|
|
62697
62632
|
/**
|
|
62698
62633
|
* deleteWorkspaceForApplication
|
|
@@ -62702,7 +62637,7 @@ const workspaceApi$2 = {
|
|
|
62702
62637
|
* @returns
|
|
62703
62638
|
*/
|
|
62704
62639
|
deleteWorkspaceForApplication: (appId, workspaceId) =>
|
|
62705
|
-
ipcRenderer$
|
|
62640
|
+
ipcRenderer$o.invoke(WORKSPACE_DELETE, { appId, workspaceId }),
|
|
62706
62641
|
};
|
|
62707
62642
|
|
|
62708
62643
|
var workspaceApi_1 = workspaceApi$2;
|
|
@@ -62714,15 +62649,13 @@ var workspaceApi_1 = workspaceApi$2;
|
|
|
62714
62649
|
*/
|
|
62715
62650
|
|
|
62716
62651
|
// ipcRenderer that must be used to invoke the events
|
|
62717
|
-
const { ipcRenderer: ipcRenderer$
|
|
62652
|
+
const { ipcRenderer: ipcRenderer$n } = require$$0$1;
|
|
62718
62653
|
|
|
62719
|
-
const { LAYOUT_LIST
|
|
62654
|
+
const { LAYOUT_LIST } = events$8;
|
|
62720
62655
|
|
|
62721
62656
|
const layoutApi$2 = {
|
|
62722
62657
|
listLayoutsForApplication: (appId) =>
|
|
62723
|
-
ipcRenderer$
|
|
62724
|
-
saveLayoutForApplication: (appId, data) =>
|
|
62725
|
-
ipcRenderer$o.invoke(LAYOUT_SAVE, { appId, data }),
|
|
62658
|
+
ipcRenderer$n.invoke(LAYOUT_LIST, { appId }),
|
|
62726
62659
|
};
|
|
62727
62660
|
|
|
62728
62661
|
var layoutApi_1 = layoutApi$2;
|
|
@@ -62734,7 +62667,7 @@ var layoutApi_1 = layoutApi$2;
|
|
|
62734
62667
|
*/
|
|
62735
62668
|
|
|
62736
62669
|
// ipcRenderer that must be used to invoke the events
|
|
62737
|
-
const { ipcRenderer: ipcRenderer$
|
|
62670
|
+
const { ipcRenderer: ipcRenderer$m } = require$$0$1;
|
|
62738
62671
|
|
|
62739
62672
|
const {
|
|
62740
62673
|
DATA_JSON_TO_CSV_FILE,
|
|
@@ -62752,7 +62685,7 @@ const {
|
|
|
62752
62685
|
const dataApi$2 = {
|
|
62753
62686
|
// convert a json array of objects to a csv string and save to file
|
|
62754
62687
|
convertJsonToCsvFile: (appId, jsonObject, filename) =>
|
|
62755
|
-
ipcRenderer$
|
|
62688
|
+
ipcRenderer$m.invoke(DATA_JSON_TO_CSV_FILE, {
|
|
62756
62689
|
appId,
|
|
62757
62690
|
jsonObject,
|
|
62758
62691
|
filename,
|
|
@@ -62760,10 +62693,10 @@ const dataApi$2 = {
|
|
|
62760
62693
|
|
|
62761
62694
|
// convert a json array of objects to a csv string and return a string
|
|
62762
62695
|
convertJsonToCsvString: (appId, jsonObject) =>
|
|
62763
|
-
ipcRenderer$
|
|
62696
|
+
ipcRenderer$m.invoke(DATA_JSON_TO_CSV_STRING, { appId, jsonObject }),
|
|
62764
62697
|
|
|
62765
62698
|
parseXMLStream: (filepath, outpath, start) =>
|
|
62766
|
-
ipcRenderer$
|
|
62699
|
+
ipcRenderer$m.invoke(PARSE_XML_STREAM, {
|
|
62767
62700
|
filepath,
|
|
62768
62701
|
outpath,
|
|
62769
62702
|
start,
|
|
@@ -62777,7 +62710,7 @@ const dataApi$2 = {
|
|
|
62777
62710
|
headers = null,
|
|
62778
62711
|
limit = null,
|
|
62779
62712
|
) => {
|
|
62780
|
-
ipcRenderer$
|
|
62713
|
+
ipcRenderer$m.invoke(PARSE_CSV_STREAM, {
|
|
62781
62714
|
filepath,
|
|
62782
62715
|
outpath,
|
|
62783
62716
|
delimiter,
|
|
@@ -62788,15 +62721,15 @@ const dataApi$2 = {
|
|
|
62788
62721
|
},
|
|
62789
62722
|
|
|
62790
62723
|
readLinesFromFile: (filepath, lineCount) => {
|
|
62791
|
-
ipcRenderer$
|
|
62724
|
+
ipcRenderer$m.invoke(READ_LINES, { filepath, lineCount });
|
|
62792
62725
|
},
|
|
62793
62726
|
|
|
62794
62727
|
readJSONFromFile: (filepath, objectCount = null) => {
|
|
62795
|
-
ipcRenderer$
|
|
62728
|
+
ipcRenderer$m.invoke(READ_JSON, { filepath, objectCount });
|
|
62796
62729
|
},
|
|
62797
62730
|
|
|
62798
62731
|
readDataFromURL: (url, toFilepath) => {
|
|
62799
|
-
ipcRenderer$
|
|
62732
|
+
ipcRenderer$m.invoke(READ_DATA_URL, { url, toFilepath });
|
|
62800
62733
|
},
|
|
62801
62734
|
|
|
62802
62735
|
/*
|
|
@@ -62805,7 +62738,7 @@ const dataApi$2 = {
|
|
|
62805
62738
|
* @param {object} returnEmpty the return empty object
|
|
62806
62739
|
*/
|
|
62807
62740
|
saveData: (data, filename, append, returnEmpty, widgetId = null) =>
|
|
62808
|
-
ipcRenderer$
|
|
62741
|
+
ipcRenderer$m.invoke(DATA_SAVE_TO_FILE, {
|
|
62809
62742
|
data,
|
|
62810
62743
|
filename,
|
|
62811
62744
|
append,
|
|
@@ -62823,7 +62756,7 @@ const dataApi$2 = {
|
|
|
62823
62756
|
* gates the gate itself).
|
|
62824
62757
|
*/
|
|
62825
62758
|
readData: (filename, returnEmpty = [], widgetId = null) =>
|
|
62826
|
-
ipcRenderer$
|
|
62759
|
+
ipcRenderer$m.invoke(DATA_READ_FROM_FILE, {
|
|
62827
62760
|
filename,
|
|
62828
62761
|
returnEmpty,
|
|
62829
62762
|
widgetId,
|
|
@@ -62834,7 +62767,7 @@ const dataApi$2 = {
|
|
|
62834
62767
|
* @returns
|
|
62835
62768
|
*/
|
|
62836
62769
|
transformFile: (filepath, outFilepath, mappingFunctionBody, args) => {
|
|
62837
|
-
ipcRenderer$
|
|
62770
|
+
ipcRenderer$m.invoke(TRANSFORM_FILE, {
|
|
62838
62771
|
filepath,
|
|
62839
62772
|
outFilepath,
|
|
62840
62773
|
mappingFunctionBody,
|
|
@@ -62852,7 +62785,7 @@ var dataApi_1 = dataApi$2;
|
|
|
62852
62785
|
*/
|
|
62853
62786
|
|
|
62854
62787
|
// ipcRenderer that must be used to invoke the events
|
|
62855
|
-
const { ipcRenderer: ipcRenderer$
|
|
62788
|
+
const { ipcRenderer: ipcRenderer$l } = require$$0$1;
|
|
62856
62789
|
|
|
62857
62790
|
const {
|
|
62858
62791
|
SETTINGS_GET,
|
|
@@ -62863,14 +62796,14 @@ const {
|
|
|
62863
62796
|
} = events$8;
|
|
62864
62797
|
|
|
62865
62798
|
const settingsApi$2 = {
|
|
62866
|
-
getSettingsForApplication: () => ipcRenderer$
|
|
62799
|
+
getSettingsForApplication: () => ipcRenderer$l.invoke(SETTINGS_GET, {}),
|
|
62867
62800
|
saveSettingsForApplication: (data) =>
|
|
62868
|
-
ipcRenderer$
|
|
62869
|
-
getDataDirectory: () => ipcRenderer$
|
|
62801
|
+
ipcRenderer$l.invoke(SETTINGS_SAVE, { data }),
|
|
62802
|
+
getDataDirectory: () => ipcRenderer$l.invoke(SETTINGS_GET_DATA_DIR, {}),
|
|
62870
62803
|
setDataDirectory: (dataDirectory) =>
|
|
62871
|
-
ipcRenderer$
|
|
62804
|
+
ipcRenderer$l.invoke(SETTINGS_SET_DATA_DIR, { dataDirectory }),
|
|
62872
62805
|
migrateDataDirectory: (oldDirectory, newDirectory) =>
|
|
62873
|
-
ipcRenderer$
|
|
62806
|
+
ipcRenderer$l.invoke(SETTINGS_MIGRATE_DATA_DIR, {
|
|
62874
62807
|
oldDirectory,
|
|
62875
62808
|
newDirectory,
|
|
62876
62809
|
}),
|
|
@@ -62885,7 +62818,7 @@ var settingsApi_1 = settingsApi$2;
|
|
|
62885
62818
|
* Provides file/folder chooser dialogs.
|
|
62886
62819
|
*/
|
|
62887
62820
|
|
|
62888
|
-
const { ipcRenderer: ipcRenderer$
|
|
62821
|
+
const { ipcRenderer: ipcRenderer$k } = require$$0$1;
|
|
62889
62822
|
|
|
62890
62823
|
const { CHOOSE_FILE } = events$8;
|
|
62891
62824
|
|
|
@@ -62898,7 +62831,7 @@ const dialogApi$2 = {
|
|
|
62898
62831
|
* @returns {Promise<string|null>} selected file/folder path, or null if cancelled
|
|
62899
62832
|
*/
|
|
62900
62833
|
chooseFile: (allowFile = true, extensions = ["*"]) => {
|
|
62901
|
-
return ipcRenderer$
|
|
62834
|
+
return ipcRenderer$k.invoke(CHOOSE_FILE, { allowFile, extensions });
|
|
62902
62835
|
},
|
|
62903
62836
|
|
|
62904
62837
|
/**
|
|
@@ -62923,7 +62856,7 @@ const dialogApi$2 = {
|
|
|
62923
62856
|
typeof options.allowFile === "boolean" ? options.allowFile : allowFile;
|
|
62924
62857
|
const resolvedExtensions = options.extensions || extensions;
|
|
62925
62858
|
|
|
62926
|
-
const filePath = await ipcRenderer$
|
|
62859
|
+
const filePath = await ipcRenderer$k.invoke(CHOOSE_FILE, {
|
|
62927
62860
|
allowFile: resolvedAllowFile,
|
|
62928
62861
|
extensions: resolvedExtensions,
|
|
62929
62862
|
});
|
|
@@ -62950,7 +62883,7 @@ var dialogApi_1 = dialogApi$2;
|
|
|
62950
62883
|
* mainApi.widgets.uninstall('Weather')
|
|
62951
62884
|
*/
|
|
62952
62885
|
|
|
62953
|
-
const { ipcRenderer: ipcRenderer$
|
|
62886
|
+
const { ipcRenderer: ipcRenderer$j } = require$$0$1;
|
|
62954
62887
|
|
|
62955
62888
|
const widgetApi$2 = {
|
|
62956
62889
|
/**
|
|
@@ -62959,7 +62892,7 @@ const widgetApi$2 = {
|
|
|
62959
62892
|
*/
|
|
62960
62893
|
list: async () => {
|
|
62961
62894
|
try {
|
|
62962
|
-
return await ipcRenderer$
|
|
62895
|
+
return await ipcRenderer$j.invoke("widget:list");
|
|
62963
62896
|
} catch (error) {
|
|
62964
62897
|
console.error("[WidgetApi] Error listing widgets:", error);
|
|
62965
62898
|
throw error;
|
|
@@ -62973,7 +62906,7 @@ const widgetApi$2 = {
|
|
|
62973
62906
|
*/
|
|
62974
62907
|
get: async (widgetName) => {
|
|
62975
62908
|
try {
|
|
62976
|
-
return await ipcRenderer$
|
|
62909
|
+
return await ipcRenderer$j.invoke("widget:get", widgetName);
|
|
62977
62910
|
} catch (error) {
|
|
62978
62911
|
console.error(`[WidgetApi] Error getting widget ${widgetName}:`, error);
|
|
62979
62912
|
throw error;
|
|
@@ -63004,7 +62937,7 @@ const widgetApi$2 = {
|
|
|
63004
62937
|
console.log(
|
|
63005
62938
|
`[WidgetApi] Installing widget: ${widgetName} from ${downloadUrl}`,
|
|
63006
62939
|
);
|
|
63007
|
-
const config = await ipcRenderer$
|
|
62940
|
+
const config = await ipcRenderer$j.invoke(
|
|
63008
62941
|
"widget:install",
|
|
63009
62942
|
widgetName,
|
|
63010
62943
|
downloadUrl,
|
|
@@ -63044,7 +62977,7 @@ const widgetApi$2 = {
|
|
|
63044
62977
|
console.log(
|
|
63045
62978
|
`[WidgetApi] Installing local widget: ${widgetName} from ${localPath}`,
|
|
63046
62979
|
);
|
|
63047
|
-
const config = await ipcRenderer$
|
|
62980
|
+
const config = await ipcRenderer$j.invoke(
|
|
63048
62981
|
"widget:install-local",
|
|
63049
62982
|
widgetName,
|
|
63050
62983
|
localPath,
|
|
@@ -63075,7 +63008,7 @@ const widgetApi$2 = {
|
|
|
63075
63008
|
loadFolder: async (folderPath) => {
|
|
63076
63009
|
try {
|
|
63077
63010
|
console.log(`[WidgetApi] Loading widgets from folder: ${folderPath}`);
|
|
63078
|
-
const results = await ipcRenderer$
|
|
63011
|
+
const results = await ipcRenderer$j.invoke(
|
|
63079
63012
|
"widget:load-folder",
|
|
63080
63013
|
folderPath,
|
|
63081
63014
|
);
|
|
@@ -63099,7 +63032,7 @@ const widgetApi$2 = {
|
|
|
63099
63032
|
uninstall: async (widgetName) => {
|
|
63100
63033
|
try {
|
|
63101
63034
|
console.log(`[WidgetApi] Uninstalling widget: ${widgetName}`);
|
|
63102
|
-
const success = await ipcRenderer$
|
|
63035
|
+
const success = await ipcRenderer$j.invoke("widget:uninstall", widgetName);
|
|
63103
63036
|
if (success) {
|
|
63104
63037
|
console.log(`[WidgetApi] ✓ Widget ${widgetName} uninstalled`);
|
|
63105
63038
|
} else {
|
|
@@ -63122,7 +63055,7 @@ const widgetApi$2 = {
|
|
|
63122
63055
|
*/
|
|
63123
63056
|
getCachePath: async () => {
|
|
63124
63057
|
try {
|
|
63125
|
-
return await ipcRenderer$
|
|
63058
|
+
return await ipcRenderer$j.invoke("widget:cache-path");
|
|
63126
63059
|
} catch (error) {
|
|
63127
63060
|
console.error("[WidgetApi] Error getting cache path:", error);
|
|
63128
63061
|
throw error;
|
|
@@ -63136,7 +63069,7 @@ const widgetApi$2 = {
|
|
|
63136
63069
|
*/
|
|
63137
63070
|
getStoragePath: async () => {
|
|
63138
63071
|
try {
|
|
63139
|
-
return await ipcRenderer$
|
|
63072
|
+
return await ipcRenderer$j.invoke("widget:storage-path");
|
|
63140
63073
|
} catch (error) {
|
|
63141
63074
|
console.error("[WidgetApi] Error getting storage path:", error);
|
|
63142
63075
|
throw error;
|
|
@@ -63153,7 +63086,7 @@ const widgetApi$2 = {
|
|
|
63153
63086
|
setStoragePath: async (customPath) => {
|
|
63154
63087
|
try {
|
|
63155
63088
|
console.log(`[WidgetApi] Setting storage path to: ${customPath}`);
|
|
63156
|
-
const result = await ipcRenderer$
|
|
63089
|
+
const result = await ipcRenderer$j.invoke(
|
|
63157
63090
|
"widget:set-storage-path",
|
|
63158
63091
|
customPath,
|
|
63159
63092
|
);
|
|
@@ -63175,7 +63108,7 @@ const widgetApi$2 = {
|
|
|
63175
63108
|
*/
|
|
63176
63109
|
getComponentConfigs: async () => {
|
|
63177
63110
|
try {
|
|
63178
|
-
return await ipcRenderer$
|
|
63111
|
+
return await ipcRenderer$j.invoke("widget:get-component-configs");
|
|
63179
63112
|
} catch (error) {
|
|
63180
63113
|
console.error("[WidgetApi] Error getting component configs:", error);
|
|
63181
63114
|
return [];
|
|
@@ -63190,7 +63123,7 @@ const widgetApi$2 = {
|
|
|
63190
63123
|
*/
|
|
63191
63124
|
readBundle: async (widgetName) => {
|
|
63192
63125
|
try {
|
|
63193
|
-
return await ipcRenderer$
|
|
63126
|
+
return await ipcRenderer$j.invoke("widget:read-bundle", widgetName);
|
|
63194
63127
|
} catch (error) {
|
|
63195
63128
|
console.error(
|
|
63196
63129
|
`[WidgetApi] Error reading bundle for ${widgetName}:`,
|
|
@@ -63209,7 +63142,7 @@ const widgetApi$2 = {
|
|
|
63209
63142
|
*/
|
|
63210
63143
|
readSources: async (widgetName, componentName) => {
|
|
63211
63144
|
try {
|
|
63212
|
-
return await ipcRenderer$
|
|
63145
|
+
return await ipcRenderer$j.invoke("widget:read-sources", {
|
|
63213
63146
|
widgetName,
|
|
63214
63147
|
componentName,
|
|
63215
63148
|
});
|
|
@@ -63229,7 +63162,7 @@ const widgetApi$2 = {
|
|
|
63229
63162
|
*/
|
|
63230
63163
|
readAllBundles: async () => {
|
|
63231
63164
|
try {
|
|
63232
|
-
return await ipcRenderer$
|
|
63165
|
+
return await ipcRenderer$j.invoke("widget:read-all-bundles");
|
|
63233
63166
|
} catch (error) {
|
|
63234
63167
|
console.error("[WidgetApi] Error reading all bundles:", error);
|
|
63235
63168
|
return [];
|
|
@@ -63249,7 +63182,7 @@ const widgetApi$2 = {
|
|
|
63249
63182
|
* });
|
|
63250
63183
|
*/
|
|
63251
63184
|
onInstalled: (callback) => {
|
|
63252
|
-
ipcRenderer$
|
|
63185
|
+
ipcRenderer$j.on("widget:installed", (event, data) => {
|
|
63253
63186
|
callback(data);
|
|
63254
63187
|
});
|
|
63255
63188
|
},
|
|
@@ -63266,7 +63199,7 @@ const widgetApi$2 = {
|
|
|
63266
63199
|
* });
|
|
63267
63200
|
*/
|
|
63268
63201
|
onUninstalled: (callback) => {
|
|
63269
|
-
ipcRenderer$
|
|
63202
|
+
ipcRenderer$j.on("widget:uninstalled", (event, data) => {
|
|
63270
63203
|
callback(data);
|
|
63271
63204
|
});
|
|
63272
63205
|
},
|
|
@@ -63284,7 +63217,7 @@ const widgetApi$2 = {
|
|
|
63284
63217
|
* });
|
|
63285
63218
|
*/
|
|
63286
63219
|
onLoaded: (callback) => {
|
|
63287
|
-
ipcRenderer$
|
|
63220
|
+
ipcRenderer$j.on("widgets:loaded", (event, data) => {
|
|
63288
63221
|
callback(data);
|
|
63289
63222
|
});
|
|
63290
63223
|
},
|
|
@@ -63295,7 +63228,7 @@ const widgetApi$2 = {
|
|
|
63295
63228
|
* @param {Function} callback - The callback to remove
|
|
63296
63229
|
*/
|
|
63297
63230
|
removeInstalledListener: (callback) => {
|
|
63298
|
-
ipcRenderer$
|
|
63231
|
+
ipcRenderer$j.removeListener("widget:installed", callback);
|
|
63299
63232
|
},
|
|
63300
63233
|
|
|
63301
63234
|
/**
|
|
@@ -63304,7 +63237,7 @@ const widgetApi$2 = {
|
|
|
63304
63237
|
* @param {Function} callback - The callback to remove
|
|
63305
63238
|
*/
|
|
63306
63239
|
removeUninstalledListener: (callback) => {
|
|
63307
|
-
ipcRenderer$
|
|
63240
|
+
ipcRenderer$j.removeListener("widget:uninstalled", callback);
|
|
63308
63241
|
},
|
|
63309
63242
|
|
|
63310
63243
|
/**
|
|
@@ -63313,7 +63246,7 @@ const widgetApi$2 = {
|
|
|
63313
63246
|
* @param {Function} callback - The callback to remove
|
|
63314
63247
|
*/
|
|
63315
63248
|
removeLoadedListener: (callback) => {
|
|
63316
|
-
ipcRenderer$
|
|
63249
|
+
ipcRenderer$j.removeListener("widgets:loaded", callback);
|
|
63317
63250
|
},
|
|
63318
63251
|
};
|
|
63319
63252
|
|
|
@@ -63326,7 +63259,7 @@ var widgetApi_1 = widgetApi$2;
|
|
|
63326
63259
|
* Communicates with main process via IPC to handle encryption and file storage
|
|
63327
63260
|
*/
|
|
63328
63261
|
|
|
63329
|
-
const { ipcRenderer: ipcRenderer$
|
|
63262
|
+
const { ipcRenderer: ipcRenderer$i } = require$$0$1;
|
|
63330
63263
|
const {
|
|
63331
63264
|
PROVIDER_SAVE,
|
|
63332
63265
|
PROVIDER_LIST,
|
|
@@ -63364,7 +63297,7 @@ const providerApi$2 = {
|
|
|
63364
63297
|
// value, preserve what's on disk" from "caller explicitly unset it".
|
|
63365
63298
|
isDefaultForType = undefined,
|
|
63366
63299
|
) =>
|
|
63367
|
-
ipcRenderer$
|
|
63300
|
+
ipcRenderer$i.invoke(PROVIDER_SAVE, {
|
|
63368
63301
|
appId,
|
|
63369
63302
|
providerName,
|
|
63370
63303
|
providerType,
|
|
@@ -63384,7 +63317,7 @@ const providerApi$2 = {
|
|
|
63384
63317
|
* @param {String} appId - the appId specified in the dash initialization
|
|
63385
63318
|
* @returns {Promise<Array>} Array of provider objects with name, type, credentials
|
|
63386
63319
|
*/
|
|
63387
|
-
listProviders: (appId) => ipcRenderer$
|
|
63320
|
+
listProviders: (appId) => ipcRenderer$i.invoke(PROVIDER_LIST, { appId }),
|
|
63388
63321
|
|
|
63389
63322
|
/**
|
|
63390
63323
|
* getProvider
|
|
@@ -63396,7 +63329,7 @@ const providerApi$2 = {
|
|
|
63396
63329
|
* @returns {Promise<Object>} Provider object with name, type, credentials
|
|
63397
63330
|
*/
|
|
63398
63331
|
getProvider: (appId, providerName) =>
|
|
63399
|
-
ipcRenderer$
|
|
63332
|
+
ipcRenderer$i.invoke(PROVIDER_GET, { appId, providerName }),
|
|
63400
63333
|
|
|
63401
63334
|
/**
|
|
63402
63335
|
* deleteProvider
|
|
@@ -63408,7 +63341,7 @@ const providerApi$2 = {
|
|
|
63408
63341
|
* @returns {Promise}
|
|
63409
63342
|
*/
|
|
63410
63343
|
deleteProvider: (appId, providerName) =>
|
|
63411
|
-
ipcRenderer$
|
|
63344
|
+
ipcRenderer$i.invoke(PROVIDER_DELETE, { appId, providerName }),
|
|
63412
63345
|
|
|
63413
63346
|
/**
|
|
63414
63347
|
* listProvidersForApplication
|
|
@@ -63418,14 +63351,14 @@ const providerApi$2 = {
|
|
|
63418
63351
|
* @param {String} appId - the appId specified in the dash initialization
|
|
63419
63352
|
*/
|
|
63420
63353
|
listProvidersForApplication: (appId) => {
|
|
63421
|
-
ipcRenderer$
|
|
63354
|
+
ipcRenderer$i
|
|
63422
63355
|
.invoke(PROVIDER_LIST, { appId })
|
|
63423
63356
|
.then((result) => {
|
|
63424
63357
|
// Emit the event for ElectronDashboardApi to listen to
|
|
63425
|
-
ipcRenderer$
|
|
63358
|
+
ipcRenderer$i.send("PROVIDER_LIST_COMPLETE", result);
|
|
63426
63359
|
})
|
|
63427
63360
|
.catch((error) => {
|
|
63428
|
-
ipcRenderer$
|
|
63361
|
+
ipcRenderer$i.send("PROVIDER_LIST_ERROR", {
|
|
63429
63362
|
error: error.message,
|
|
63430
63363
|
});
|
|
63431
63364
|
});
|
|
@@ -63442,7 +63375,7 @@ const providerApi$2 = {
|
|
|
63442
63375
|
providerType,
|
|
63443
63376
|
credentials,
|
|
63444
63377
|
) => {
|
|
63445
|
-
ipcRenderer$
|
|
63378
|
+
ipcRenderer$i
|
|
63446
63379
|
.invoke(PROVIDER_SAVE, {
|
|
63447
63380
|
appId,
|
|
63448
63381
|
providerName,
|
|
@@ -63450,10 +63383,10 @@ const providerApi$2 = {
|
|
|
63450
63383
|
credentials,
|
|
63451
63384
|
})
|
|
63452
63385
|
.then((result) => {
|
|
63453
|
-
ipcRenderer$
|
|
63386
|
+
ipcRenderer$i.send("PROVIDER_SAVE_COMPLETE", result);
|
|
63454
63387
|
})
|
|
63455
63388
|
.catch((error) => {
|
|
63456
|
-
ipcRenderer$
|
|
63389
|
+
ipcRenderer$i.send("PROVIDER_SAVE_ERROR", {
|
|
63457
63390
|
error: error.message,
|
|
63458
63391
|
});
|
|
63459
63392
|
});
|
|
@@ -63465,13 +63398,13 @@ const providerApi$2 = {
|
|
|
63465
63398
|
* Event-listener-based version for use with ElectronDashboardApi
|
|
63466
63399
|
*/
|
|
63467
63400
|
getProviderForApplication: (appId, providerName) => {
|
|
63468
|
-
ipcRenderer$
|
|
63401
|
+
ipcRenderer$i
|
|
63469
63402
|
.invoke(PROVIDER_GET, { appId, providerName })
|
|
63470
63403
|
.then((result) => {
|
|
63471
|
-
ipcRenderer$
|
|
63404
|
+
ipcRenderer$i.send("PROVIDER_GET_COMPLETE", result);
|
|
63472
63405
|
})
|
|
63473
63406
|
.catch((error) => {
|
|
63474
|
-
ipcRenderer$
|
|
63407
|
+
ipcRenderer$i.send("PROVIDER_GET_ERROR", {
|
|
63475
63408
|
error: error.message,
|
|
63476
63409
|
});
|
|
63477
63410
|
});
|
|
@@ -63483,13 +63416,13 @@ const providerApi$2 = {
|
|
|
63483
63416
|
* Event-listener-based version for use with ElectronDashboardApi
|
|
63484
63417
|
*/
|
|
63485
63418
|
deleteProviderForApplication: (appId, providerName) => {
|
|
63486
|
-
ipcRenderer$
|
|
63419
|
+
ipcRenderer$i
|
|
63487
63420
|
.invoke(PROVIDER_DELETE, { appId, providerName })
|
|
63488
63421
|
.then((result) => {
|
|
63489
|
-
ipcRenderer$
|
|
63422
|
+
ipcRenderer$i.send("PROVIDER_DELETE_COMPLETE", result);
|
|
63490
63423
|
})
|
|
63491
63424
|
.catch((error) => {
|
|
63492
|
-
ipcRenderer$
|
|
63425
|
+
ipcRenderer$i.send("PROVIDER_DELETE_ERROR", {
|
|
63493
63426
|
error: error.message,
|
|
63494
63427
|
});
|
|
63495
63428
|
});
|
|
@@ -63505,7 +63438,7 @@ var providerApi_1 = providerApi$2;
|
|
|
63505
63438
|
* Communicates with main process via IPC to manage MCP server lifecycle.
|
|
63506
63439
|
*/
|
|
63507
63440
|
|
|
63508
|
-
const { ipcRenderer: ipcRenderer$
|
|
63441
|
+
const { ipcRenderer: ipcRenderer$h } = require$$0$1;
|
|
63509
63442
|
const {
|
|
63510
63443
|
MCP_START_SERVER,
|
|
63511
63444
|
MCP_STOP_SERVER,
|
|
@@ -63544,7 +63477,7 @@ const mcpApi$2 = {
|
|
|
63544
63477
|
workspaceId = null,
|
|
63545
63478
|
pathScope = null,
|
|
63546
63479
|
) =>
|
|
63547
|
-
ipcRenderer$
|
|
63480
|
+
ipcRenderer$h.invoke(MCP_START_SERVER, {
|
|
63548
63481
|
serverName,
|
|
63549
63482
|
mcpConfig,
|
|
63550
63483
|
credentials,
|
|
@@ -63561,7 +63494,7 @@ const mcpApi$2 = {
|
|
|
63561
63494
|
* @returns {Promise<{ success, serverName } | { error, message }>}
|
|
63562
63495
|
*/
|
|
63563
63496
|
stopServer: (serverName, workspaceId = null) =>
|
|
63564
|
-
ipcRenderer$
|
|
63497
|
+
ipcRenderer$h.invoke(MCP_STOP_SERVER, { serverName, workspaceId }),
|
|
63565
63498
|
|
|
63566
63499
|
/**
|
|
63567
63500
|
* listTools
|
|
@@ -63572,7 +63505,7 @@ const mcpApi$2 = {
|
|
|
63572
63505
|
* @returns {Promise<{ tools } | { error, message }>}
|
|
63573
63506
|
*/
|
|
63574
63507
|
listTools: (serverName, workspaceId = null) =>
|
|
63575
|
-
ipcRenderer$
|
|
63508
|
+
ipcRenderer$h.invoke(MCP_LIST_TOOLS, { serverName, workspaceId }),
|
|
63576
63509
|
|
|
63577
63510
|
/**
|
|
63578
63511
|
* callTool
|
|
@@ -63600,7 +63533,7 @@ const mcpApi$2 = {
|
|
|
63600
63533
|
widgetId = null,
|
|
63601
63534
|
workspaceId = null,
|
|
63602
63535
|
) =>
|
|
63603
|
-
ipcRenderer$
|
|
63536
|
+
ipcRenderer$h.invoke(MCP_CALL_TOOL, {
|
|
63604
63537
|
serverName,
|
|
63605
63538
|
toolName,
|
|
63606
63539
|
args,
|
|
@@ -63618,7 +63551,7 @@ const mcpApi$2 = {
|
|
|
63618
63551
|
* @returns {Promise<{ resources } | { error, message }>}
|
|
63619
63552
|
*/
|
|
63620
63553
|
listResources: (serverName, workspaceId = null) =>
|
|
63621
|
-
ipcRenderer$
|
|
63554
|
+
ipcRenderer$h.invoke(MCP_LIST_RESOURCES, { serverName, workspaceId }),
|
|
63622
63555
|
|
|
63623
63556
|
/**
|
|
63624
63557
|
* readResource
|
|
@@ -63630,7 +63563,7 @@ const mcpApi$2 = {
|
|
|
63630
63563
|
* @returns {Promise<{ resource } | { error, message }>}
|
|
63631
63564
|
*/
|
|
63632
63565
|
readResource: (serverName, uri, workspaceId = null) =>
|
|
63633
|
-
ipcRenderer$
|
|
63566
|
+
ipcRenderer$h.invoke(MCP_READ_RESOURCE, { serverName, uri, workspaceId }),
|
|
63634
63567
|
|
|
63635
63568
|
/**
|
|
63636
63569
|
* getServerStatus
|
|
@@ -63641,7 +63574,7 @@ const mcpApi$2 = {
|
|
|
63641
63574
|
* @returns {Promise<{ status, tools, error }>}
|
|
63642
63575
|
*/
|
|
63643
63576
|
getServerStatus: (serverName, workspaceId = null) =>
|
|
63644
|
-
ipcRenderer$
|
|
63577
|
+
ipcRenderer$h.invoke(MCP_SERVER_STATUS, { serverName, workspaceId }),
|
|
63645
63578
|
|
|
63646
63579
|
/**
|
|
63647
63580
|
* getCatalog
|
|
@@ -63649,7 +63582,7 @@ const mcpApi$2 = {
|
|
|
63649
63582
|
*
|
|
63650
63583
|
* @returns {Promise<{ catalog } | { error, message }>}
|
|
63651
63584
|
*/
|
|
63652
|
-
getCatalog: () => ipcRenderer$
|
|
63585
|
+
getCatalog: () => ipcRenderer$h.invoke(MCP_GET_CATALOG),
|
|
63653
63586
|
|
|
63654
63587
|
/**
|
|
63655
63588
|
* getKnownExternalCatalog
|
|
@@ -63661,7 +63594,7 @@ const mcpApi$2 = {
|
|
|
63661
63594
|
*
|
|
63662
63595
|
* @returns {Promise<{ success, servers } | { error, message, servers }>}
|
|
63663
63596
|
*/
|
|
63664
|
-
getKnownExternalCatalog: () => ipcRenderer$
|
|
63597
|
+
getKnownExternalCatalog: () => ipcRenderer$h.invoke(MCP_GET_KNOWN_EXTERNAL),
|
|
63665
63598
|
|
|
63666
63599
|
/**
|
|
63667
63600
|
* onInstallKnownExternalConfirm
|
|
@@ -63675,9 +63608,9 @@ const mcpApi$2 = {
|
|
|
63675
63608
|
*/
|
|
63676
63609
|
onInstallKnownExternalConfirm: (callback) => {
|
|
63677
63610
|
const handler = (_e, data) => callback(data);
|
|
63678
|
-
ipcRenderer$
|
|
63611
|
+
ipcRenderer$h.on(MCP_INSTALL_KNOWN_EXTERNAL_CONFIRM$1, handler);
|
|
63679
63612
|
return () =>
|
|
63680
|
-
ipcRenderer$
|
|
63613
|
+
ipcRenderer$h.removeListener(MCP_INSTALL_KNOWN_EXTERNAL_CONFIRM$1, handler);
|
|
63681
63614
|
},
|
|
63682
63615
|
|
|
63683
63616
|
/**
|
|
@@ -63688,7 +63621,7 @@ const mcpApi$2 = {
|
|
|
63688
63621
|
* @param {{ confirmed: boolean, credentials?: object, error?: string }} result
|
|
63689
63622
|
*/
|
|
63690
63623
|
sendInstallKnownExternalResult: (requestId, result) =>
|
|
63691
|
-
ipcRenderer$
|
|
63624
|
+
ipcRenderer$h.send(MCP_INSTALL_KNOWN_EXTERNAL_RESULT$1, { requestId, result }),
|
|
63692
63625
|
|
|
63693
63626
|
/**
|
|
63694
63627
|
* runAuth
|
|
@@ -63700,7 +63633,7 @@ const mcpApi$2 = {
|
|
|
63700
63633
|
* @returns {Promise<{ success } | { error, message }>}
|
|
63701
63634
|
*/
|
|
63702
63635
|
runAuth: (mcpConfig, credentials, authCommand) =>
|
|
63703
|
-
ipcRenderer$
|
|
63636
|
+
ipcRenderer$h.invoke(MCP_RUN_AUTH, { mcpConfig, credentials, authCommand }),
|
|
63704
63637
|
};
|
|
63705
63638
|
|
|
63706
63639
|
var mcpApi_1 = mcpApi$2;
|
|
@@ -63718,7 +63651,7 @@ var mcpApi_1 = mcpApi$2;
|
|
|
63718
63651
|
* mainApi.registry.checkUpdates([{ name: "weather-widgets", version: "1.0.0" }])
|
|
63719
63652
|
*/
|
|
63720
63653
|
|
|
63721
|
-
const { ipcRenderer: ipcRenderer$
|
|
63654
|
+
const { ipcRenderer: ipcRenderer$g } = require$$0$1;
|
|
63722
63655
|
|
|
63723
63656
|
const registryApi$2 = {
|
|
63724
63657
|
/**
|
|
@@ -63728,7 +63661,7 @@ const registryApi$2 = {
|
|
|
63728
63661
|
*/
|
|
63729
63662
|
fetchIndex: async (forceRefresh = false) => {
|
|
63730
63663
|
try {
|
|
63731
|
-
return await ipcRenderer$
|
|
63664
|
+
return await ipcRenderer$g.invoke("registry:fetch-index", forceRefresh);
|
|
63732
63665
|
} catch (error) {
|
|
63733
63666
|
console.error("[RegistryApi] Error fetching index:", error);
|
|
63734
63667
|
throw error;
|
|
@@ -63743,7 +63676,7 @@ const registryApi$2 = {
|
|
|
63743
63676
|
*/
|
|
63744
63677
|
search: async (query = "", filters = {}) => {
|
|
63745
63678
|
try {
|
|
63746
|
-
return await ipcRenderer$
|
|
63679
|
+
return await ipcRenderer$g.invoke("registry:search", query, filters);
|
|
63747
63680
|
} catch (error) {
|
|
63748
63681
|
console.error("[RegistryApi] Error searching registry:", error);
|
|
63749
63682
|
throw error;
|
|
@@ -63757,7 +63690,7 @@ const registryApi$2 = {
|
|
|
63757
63690
|
*/
|
|
63758
63691
|
getPackage: async (packageName) => {
|
|
63759
63692
|
try {
|
|
63760
|
-
return await ipcRenderer$
|
|
63693
|
+
return await ipcRenderer$g.invoke("registry:get-package", packageName);
|
|
63761
63694
|
} catch (error) {
|
|
63762
63695
|
console.error(
|
|
63763
63696
|
`[RegistryApi] Error getting package ${packageName}:`,
|
|
@@ -63774,7 +63707,7 @@ const registryApi$2 = {
|
|
|
63774
63707
|
*/
|
|
63775
63708
|
checkUpdates: async (installedWidgets = []) => {
|
|
63776
63709
|
try {
|
|
63777
|
-
return await ipcRenderer$
|
|
63710
|
+
return await ipcRenderer$g.invoke(
|
|
63778
63711
|
"registry:check-updates",
|
|
63779
63712
|
installedWidgets,
|
|
63780
63713
|
);
|
|
@@ -63792,7 +63725,7 @@ const registryApi$2 = {
|
|
|
63792
63725
|
*/
|
|
63793
63726
|
searchDashboards: async (query = "", filters = {}) => {
|
|
63794
63727
|
try {
|
|
63795
|
-
return await ipcRenderer$
|
|
63728
|
+
return await ipcRenderer$g.invoke(
|
|
63796
63729
|
"registry:search-dashboards",
|
|
63797
63730
|
query,
|
|
63798
63731
|
filters,
|
|
@@ -63811,7 +63744,7 @@ const registryApi$2 = {
|
|
|
63811
63744
|
*/
|
|
63812
63745
|
searchThemes: async (query = "", filters = {}) => {
|
|
63813
63746
|
try {
|
|
63814
|
-
return await ipcRenderer$
|
|
63747
|
+
return await ipcRenderer$g.invoke("registry:search-themes", query, filters);
|
|
63815
63748
|
} catch (error) {
|
|
63816
63749
|
console.error("[RegistryApi] Error searching themes:", error);
|
|
63817
63750
|
throw error;
|
|
@@ -63833,7 +63766,7 @@ const registryApi$2 = {
|
|
|
63833
63766
|
*/
|
|
63834
63767
|
publishWidget: async (appId, packageId, options = {}) => {
|
|
63835
63768
|
try {
|
|
63836
|
-
return await ipcRenderer$
|
|
63769
|
+
return await ipcRenderer$g.invoke("registry:publish-widget", {
|
|
63837
63770
|
appId,
|
|
63838
63771
|
packageId,
|
|
63839
63772
|
options,
|
|
@@ -63854,7 +63787,7 @@ const registryApi$2 = {
|
|
|
63854
63787
|
*/
|
|
63855
63788
|
inspectWidgetPackage: async (packageId) => {
|
|
63856
63789
|
try {
|
|
63857
|
-
return await ipcRenderer$
|
|
63790
|
+
return await ipcRenderer$g.invoke("registry:inspect-widget-package", {
|
|
63858
63791
|
packageId,
|
|
63859
63792
|
});
|
|
63860
63793
|
} catch (error) {
|
|
@@ -63875,7 +63808,7 @@ const registryApi$2 = {
|
|
|
63875
63808
|
*/
|
|
63876
63809
|
scanWidgetDefaults: async (packageId) => {
|
|
63877
63810
|
try {
|
|
63878
|
-
return await ipcRenderer$
|
|
63811
|
+
return await ipcRenderer$g.invoke("registry:scan-widget-defaults", {
|
|
63879
63812
|
packageId,
|
|
63880
63813
|
});
|
|
63881
63814
|
} catch (error) {
|
|
@@ -63898,7 +63831,7 @@ const registryApi$2 = {
|
|
|
63898
63831
|
*/
|
|
63899
63832
|
previewFetch: async (packageName, componentName = null) => {
|
|
63900
63833
|
try {
|
|
63901
|
-
return await ipcRenderer$
|
|
63834
|
+
return await ipcRenderer$g.invoke(
|
|
63902
63835
|
"registry:preview-fetch",
|
|
63903
63836
|
packageName,
|
|
63904
63837
|
componentName,
|
|
@@ -63921,7 +63854,7 @@ var registryApi_1 = registryApi$2;
|
|
|
63921
63854
|
* Handle the theme configuration file
|
|
63922
63855
|
*/
|
|
63923
63856
|
|
|
63924
|
-
const { ipcRenderer: ipcRenderer$
|
|
63857
|
+
const { ipcRenderer: ipcRenderer$f } = require$$0$1;
|
|
63925
63858
|
|
|
63926
63859
|
const {
|
|
63927
63860
|
THEME_LIST,
|
|
@@ -63934,17 +63867,17 @@ const {
|
|
|
63934
63867
|
|
|
63935
63868
|
const themeApi$2 = {
|
|
63936
63869
|
listThemesForApplication: (appId) =>
|
|
63937
|
-
ipcRenderer$
|
|
63870
|
+
ipcRenderer$f.invoke(THEME_LIST, { appId }),
|
|
63938
63871
|
saveThemeForApplication: (appId, themeName, themeObject) =>
|
|
63939
|
-
ipcRenderer$
|
|
63872
|
+
ipcRenderer$f.invoke(THEME_SAVE, { appId, themeName, themeObject }),
|
|
63940
63873
|
deleteThemeForApplication: (appId, themeKey) =>
|
|
63941
|
-
ipcRenderer$
|
|
63874
|
+
ipcRenderer$f.invoke(THEME_DELETE, { appId, themeKey }),
|
|
63942
63875
|
publishTheme: (appId, themeKey, options) =>
|
|
63943
|
-
ipcRenderer$
|
|
63876
|
+
ipcRenderer$f.invoke(THEME_PUBLISH, { appId, themeKey, options }),
|
|
63944
63877
|
installThemeFromRegistry: (appId, packageName) =>
|
|
63945
|
-
ipcRenderer$
|
|
63878
|
+
ipcRenderer$f.invoke(THEME_INSTALL_FROM_REGISTRY, { appId, packageName }),
|
|
63946
63879
|
getThemePublishPreview: (appId, themeKey) =>
|
|
63947
|
-
ipcRenderer$
|
|
63880
|
+
ipcRenderer$f.invoke(THEME_PUBLISH_PREVIEW, { appId, themeKey }),
|
|
63948
63881
|
};
|
|
63949
63882
|
|
|
63950
63883
|
var themeApi_1 = themeApi$2;
|
|
@@ -63956,12 +63889,11 @@ var themeApi_1 = themeApi$2;
|
|
|
63956
63889
|
*/
|
|
63957
63890
|
|
|
63958
63891
|
// ipcRenderer that must be used to invoke the events
|
|
63959
|
-
const { ipcRenderer: ipcRenderer$
|
|
63892
|
+
const { ipcRenderer: ipcRenderer$e } = require$$0$1;
|
|
63960
63893
|
|
|
63961
63894
|
const {
|
|
63962
63895
|
ALGOLIA_LIST_INDICES,
|
|
63963
63896
|
ALGOLIA_ANALYTICS_FOR_QUERY,
|
|
63964
|
-
ALGOLIA_SAVE_SYNONYMS,
|
|
63965
63897
|
ALGOLIA_PARTIAL_UPDATE_OBJECTS,
|
|
63966
63898
|
ALGOLIA_CREATE_BATCH,
|
|
63967
63899
|
ALGOLIA_BROWSE_OBJECTS,
|
|
@@ -63970,10 +63902,10 @@ const {
|
|
|
63970
63902
|
|
|
63971
63903
|
const algoliaApi$2 = {
|
|
63972
63904
|
listIndices: (application) =>
|
|
63973
|
-
ipcRenderer$
|
|
63905
|
+
ipcRenderer$e.invoke(ALGOLIA_LIST_INDICES, application),
|
|
63974
63906
|
|
|
63975
63907
|
browseObjects: (appId, apiKey, indexName) => {
|
|
63976
|
-
ipcRenderer$
|
|
63908
|
+
ipcRenderer$e.invoke(ALGOLIA_BROWSE_OBJECTS, {
|
|
63977
63909
|
appId,
|
|
63978
63910
|
apiKey,
|
|
63979
63911
|
indexName,
|
|
@@ -63981,10 +63913,8 @@ const algoliaApi$2 = {
|
|
|
63981
63913
|
});
|
|
63982
63914
|
},
|
|
63983
63915
|
|
|
63984
|
-
saveSynonyms: () => ipcRenderer$f.invoke(ALGOLIA_SAVE_SYNONYMS, {}),
|
|
63985
|
-
|
|
63986
63916
|
getAnalyticsForQuery: (application, indexName, query) =>
|
|
63987
|
-
ipcRenderer$
|
|
63917
|
+
ipcRenderer$e.invoke(ALGOLIA_ANALYTICS_FOR_QUERY, {
|
|
63988
63918
|
application,
|
|
63989
63919
|
indexName,
|
|
63990
63920
|
query,
|
|
@@ -63997,7 +63927,7 @@ const algoliaApi$2 = {
|
|
|
63997
63927
|
dir,
|
|
63998
63928
|
createIfNotExists = false,
|
|
63999
63929
|
) =>
|
|
64000
|
-
ipcRenderer$
|
|
63930
|
+
ipcRenderer$e.invoke(ALGOLIA_PARTIAL_UPDATE_OBJECTS, {
|
|
64001
63931
|
appId,
|
|
64002
63932
|
apiKey,
|
|
64003
63933
|
indexName,
|
|
@@ -64006,7 +63936,7 @@ const algoliaApi$2 = {
|
|
|
64006
63936
|
}),
|
|
64007
63937
|
|
|
64008
63938
|
createBatchesFromFile: (filepath, batchFilepath, batchSize) => {
|
|
64009
|
-
ipcRenderer$
|
|
63939
|
+
ipcRenderer$e.invoke(ALGOLIA_CREATE_BATCH, {
|
|
64010
63940
|
filepath,
|
|
64011
63941
|
batchFilepath,
|
|
64012
63942
|
batchSize,
|
|
@@ -64014,7 +63944,7 @@ const algoliaApi$2 = {
|
|
|
64014
63944
|
},
|
|
64015
63945
|
|
|
64016
63946
|
browseObjectsToFile: (appId, apiKey, indexName, toFilename, query = "") => {
|
|
64017
|
-
ipcRenderer$
|
|
63947
|
+
ipcRenderer$e.invoke(ALGOLIA_BROWSE_OBJECTS, {
|
|
64018
63948
|
appId,
|
|
64019
63949
|
apiKey,
|
|
64020
63950
|
indexName,
|
|
@@ -64024,7 +63954,7 @@ const algoliaApi$2 = {
|
|
|
64024
63954
|
},
|
|
64025
63955
|
|
|
64026
63956
|
search: (appId, apiKey, indexName, query = "", options = {}) =>
|
|
64027
|
-
ipcRenderer$
|
|
63957
|
+
ipcRenderer$e.invoke(ALGOLIA_SEARCH, {
|
|
64028
63958
|
appId,
|
|
64029
63959
|
apiKey,
|
|
64030
63960
|
indexName,
|
|
@@ -64039,14 +63969,14 @@ var algoliaApi_1 = algoliaApi$2;
|
|
|
64039
63969
|
* openAI
|
|
64040
63970
|
*/
|
|
64041
63971
|
|
|
64042
|
-
const { ipcRenderer: ipcRenderer$
|
|
63972
|
+
const { ipcRenderer: ipcRenderer$d } = require$$0$1;
|
|
64043
63973
|
|
|
64044
63974
|
const { OPENAI_DESCRIBE_IMAGE } = openaiEvents$1;
|
|
64045
63975
|
|
|
64046
63976
|
const openaiApi$2 = {
|
|
64047
63977
|
// convert a json array of objects to a csv string and save to file
|
|
64048
63978
|
describeImage: (imageUrl, apiKey, prompt = "What's in this image?") =>
|
|
64049
|
-
ipcRenderer$
|
|
63979
|
+
ipcRenderer$d.invoke(OPENAI_DESCRIBE_IMAGE, { imageUrl, apiKey, prompt }),
|
|
64050
63980
|
};
|
|
64051
63981
|
|
|
64052
63982
|
var openaiApi_1 = openaiApi$2;
|
|
@@ -64057,14 +63987,14 @@ var openaiApi_1 = openaiApi$2;
|
|
|
64057
63987
|
*/
|
|
64058
63988
|
|
|
64059
63989
|
// ipcRenderer that must be used to invoke the events
|
|
64060
|
-
const { ipcRenderer: ipcRenderer$
|
|
63990
|
+
const { ipcRenderer: ipcRenderer$c } = require$$0$1;
|
|
64061
63991
|
|
|
64062
63992
|
const { MENU_ITEMS_SAVE, MENU_ITEMS_LIST } = events$8;
|
|
64063
63993
|
|
|
64064
63994
|
const menuItemsApi$2 = {
|
|
64065
63995
|
saveMenuItem: (appId, menuItem) =>
|
|
64066
|
-
ipcRenderer$
|
|
64067
|
-
listMenuItems: (appId) => ipcRenderer$
|
|
63996
|
+
ipcRenderer$c.invoke(MENU_ITEMS_SAVE, { appId, menuItem }),
|
|
63997
|
+
listMenuItems: (appId) => ipcRenderer$c.invoke(MENU_ITEMS_LIST, { appId }),
|
|
64068
63998
|
};
|
|
64069
63999
|
|
|
64070
64000
|
var menuItemsApi_1 = menuItemsApi$2;
|
|
@@ -64076,12 +64006,12 @@ var menuItemsApi_1 = menuItemsApi$2;
|
|
|
64076
64006
|
*/
|
|
64077
64007
|
|
|
64078
64008
|
// ipcRenderer that must be used to invoke the events
|
|
64079
|
-
const { ipcRenderer: ipcRenderer$
|
|
64009
|
+
const { ipcRenderer: ipcRenderer$b } = require$$0$1;
|
|
64080
64010
|
|
|
64081
64011
|
const pluginApi$2 = {
|
|
64082
64012
|
install: (packageName, filepath) =>
|
|
64083
|
-
ipcRenderer$
|
|
64084
|
-
uninstall: (filepath) => ipcRenderer$
|
|
64013
|
+
ipcRenderer$b.invoke("plugin-install", { packageName, filepath }),
|
|
64014
|
+
uninstall: (filepath) => ipcRenderer$b.invoke("plugin-uninstall", filepath),
|
|
64085
64015
|
};
|
|
64086
64016
|
|
|
64087
64017
|
var pluginApi_1 = pluginApi$2;
|
|
@@ -64094,7 +64024,7 @@ var pluginApi_1 = pluginApi$2;
|
|
|
64094
64024
|
* tool-use events, and request cancellation.
|
|
64095
64025
|
*/
|
|
64096
64026
|
|
|
64097
|
-
const { ipcRenderer: ipcRenderer$
|
|
64027
|
+
const { ipcRenderer: ipcRenderer$a } = require$$0$1;
|
|
64098
64028
|
const {
|
|
64099
64029
|
LLM_SEND_MESSAGE,
|
|
64100
64030
|
LLM_ABORT_REQUEST,
|
|
@@ -64116,7 +64046,7 @@ const _listenerMap = new Map();
|
|
|
64116
64046
|
function _addListener(channel, callback) {
|
|
64117
64047
|
const id = String(++_nextListenerId);
|
|
64118
64048
|
const wrapped = (_event, data) => callback(data);
|
|
64119
|
-
ipcRenderer$
|
|
64049
|
+
ipcRenderer$a.on(channel, wrapped);
|
|
64120
64050
|
_listenerMap.set(id, { channel, wrapped });
|
|
64121
64051
|
return id;
|
|
64122
64052
|
}
|
|
@@ -64131,7 +64061,7 @@ const llmApi$2 = {
|
|
|
64131
64061
|
* @returns {Promise<void>}
|
|
64132
64062
|
*/
|
|
64133
64063
|
sendMessage: (requestId, params) =>
|
|
64134
|
-
ipcRenderer$
|
|
64064
|
+
ipcRenderer$a.invoke(LLM_SEND_MESSAGE, { requestId, ...params }),
|
|
64135
64065
|
|
|
64136
64066
|
/**
|
|
64137
64067
|
* abortRequest
|
|
@@ -64141,7 +64071,7 @@ const llmApi$2 = {
|
|
|
64141
64071
|
* @returns {Promise<{ success: boolean }>}
|
|
64142
64072
|
*/
|
|
64143
64073
|
abortRequest: (requestId) =>
|
|
64144
|
-
ipcRenderer$
|
|
64074
|
+
ipcRenderer$a.invoke(LLM_ABORT_REQUEST, { requestId }),
|
|
64145
64075
|
|
|
64146
64076
|
/**
|
|
64147
64077
|
* listConnectedTools
|
|
@@ -64149,7 +64079,7 @@ const llmApi$2 = {
|
|
|
64149
64079
|
*
|
|
64150
64080
|
* @returns {Promise<Array<{ serverName, tools, resources, status }>>}
|
|
64151
64081
|
*/
|
|
64152
|
-
listConnectedTools: () => ipcRenderer$
|
|
64082
|
+
listConnectedTools: () => ipcRenderer$a.invoke(LLM_LIST_CONNECTED_TOOLS),
|
|
64153
64083
|
|
|
64154
64084
|
/**
|
|
64155
64085
|
* checkCliAvailable
|
|
@@ -64157,7 +64087,7 @@ const llmApi$2 = {
|
|
|
64157
64087
|
*
|
|
64158
64088
|
* @returns {Promise<{ available: boolean, path?: string }>}
|
|
64159
64089
|
*/
|
|
64160
|
-
checkCliAvailable: () => ipcRenderer$
|
|
64090
|
+
checkCliAvailable: () => ipcRenderer$a.invoke(LLM_CHECK_CLI_AVAILABLE),
|
|
64161
64091
|
|
|
64162
64092
|
/**
|
|
64163
64093
|
* clearCliSession
|
|
@@ -64167,7 +64097,7 @@ const llmApi$2 = {
|
|
|
64167
64097
|
* @returns {Promise<{ success: boolean }>}
|
|
64168
64098
|
*/
|
|
64169
64099
|
clearCliSession: (widgetUuid) =>
|
|
64170
|
-
ipcRenderer$
|
|
64100
|
+
ipcRenderer$a.invoke(LLM_CLEAR_CLI_SESSION, { widgetUuid }),
|
|
64171
64101
|
|
|
64172
64102
|
/**
|
|
64173
64103
|
* getCliSessionStatus
|
|
@@ -64177,7 +64107,7 @@ const llmApi$2 = {
|
|
|
64177
64107
|
* @returns {Promise<{ hasSession: boolean, sessionId?: string, isProcessActive: boolean }>}
|
|
64178
64108
|
*/
|
|
64179
64109
|
getCliSessionStatus: (widgetUuid) =>
|
|
64180
|
-
ipcRenderer$
|
|
64110
|
+
ipcRenderer$a.invoke(LLM_CLI_SESSION_STATUS, { widgetUuid }),
|
|
64181
64111
|
|
|
64182
64112
|
/**
|
|
64183
64113
|
* endCliSession
|
|
@@ -64187,7 +64117,7 @@ const llmApi$2 = {
|
|
|
64187
64117
|
* @returns {Promise<{ success: boolean }>}
|
|
64188
64118
|
*/
|
|
64189
64119
|
endCliSession: (widgetUuid) =>
|
|
64190
|
-
ipcRenderer$
|
|
64120
|
+
ipcRenderer$a.invoke(LLM_CLI_END_SESSION, { widgetUuid }),
|
|
64191
64121
|
|
|
64192
64122
|
// --- Stream event listeners ---
|
|
64193
64123
|
// Each on* method returns an opaque string ID. Strings cross the
|
|
@@ -64221,7 +64151,7 @@ const llmApi$2 = {
|
|
|
64221
64151
|
const listenerId = id !== undefined ? String(id) : String(idOrChannel);
|
|
64222
64152
|
const entry = _listenerMap.get(listenerId);
|
|
64223
64153
|
if (entry) {
|
|
64224
|
-
ipcRenderer$
|
|
64154
|
+
ipcRenderer$a.removeListener(entry.channel, entry.wrapped);
|
|
64225
64155
|
_listenerMap.delete(listenerId);
|
|
64226
64156
|
}
|
|
64227
64157
|
},
|
|
@@ -64233,70 +64163,19 @@ const llmApi$2 = {
|
|
|
64233
64163
|
*/
|
|
64234
64164
|
removeAllStreamListeners: () => {
|
|
64235
64165
|
for (const [, entry] of _listenerMap) {
|
|
64236
|
-
ipcRenderer$
|
|
64166
|
+
ipcRenderer$a.removeListener(entry.channel, entry.wrapped);
|
|
64237
64167
|
}
|
|
64238
64168
|
_listenerMap.clear();
|
|
64239
|
-
ipcRenderer$
|
|
64240
|
-
ipcRenderer$
|
|
64241
|
-
ipcRenderer$
|
|
64242
|
-
ipcRenderer$
|
|
64243
|
-
ipcRenderer$
|
|
64169
|
+
ipcRenderer$a.removeAllListeners(LLM_STREAM_DELTA);
|
|
64170
|
+
ipcRenderer$a.removeAllListeners(LLM_STREAM_TOOL_CALL);
|
|
64171
|
+
ipcRenderer$a.removeAllListeners(LLM_STREAM_TOOL_RESULT);
|
|
64172
|
+
ipcRenderer$a.removeAllListeners(LLM_STREAM_COMPLETE);
|
|
64173
|
+
ipcRenderer$a.removeAllListeners(LLM_STREAM_ERROR);
|
|
64244
64174
|
},
|
|
64245
64175
|
};
|
|
64246
64176
|
|
|
64247
64177
|
var llmApi_1 = llmApi$2;
|
|
64248
64178
|
|
|
64249
|
-
/**
|
|
64250
|
-
* clientCacheApi.js
|
|
64251
|
-
*
|
|
64252
|
-
* Renderer-side API for cache management.
|
|
64253
|
-
* Communicates with main process via IPC to invalidate cached clients
|
|
64254
|
-
* and manage the response cache.
|
|
64255
|
-
*/
|
|
64256
|
-
|
|
64257
|
-
const { ipcRenderer: ipcRenderer$a } = require$$0$1;
|
|
64258
|
-
const {
|
|
64259
|
-
CLIENT_CACHE_INVALIDATE,
|
|
64260
|
-
CLIENT_CACHE_INVALIDATE_ALL,
|
|
64261
|
-
RESPONSE_CACHE_CLEAR,
|
|
64262
|
-
RESPONSE_CACHE_STATS,
|
|
64263
|
-
} = events$8;
|
|
64264
|
-
|
|
64265
|
-
const clientCacheApi$2 = {
|
|
64266
|
-
/**
|
|
64267
|
-
* Invalidate a specific cached client by provider identity.
|
|
64268
|
-
*
|
|
64269
|
-
* @param {string} appId - the application id
|
|
64270
|
-
* @param {string} providerName - the provider name to invalidate
|
|
64271
|
-
* @returns {Promise<{success: boolean}>}
|
|
64272
|
-
*/
|
|
64273
|
-
invalidate: (appId, providerName) =>
|
|
64274
|
-
ipcRenderer$a.invoke(CLIENT_CACHE_INVALIDATE, { appId, providerName }),
|
|
64275
|
-
|
|
64276
|
-
/**
|
|
64277
|
-
* Invalidate all cached clients.
|
|
64278
|
-
*
|
|
64279
|
-
* @returns {Promise<{success: boolean}>}
|
|
64280
|
-
*/
|
|
64281
|
-
invalidateAll: () => ipcRenderer$a.invoke(CLIENT_CACHE_INVALIDATE_ALL),
|
|
64282
|
-
|
|
64283
|
-
/**
|
|
64284
|
-
* Clear the response cache.
|
|
64285
|
-
*
|
|
64286
|
-
* @returns {Promise<{success: boolean}>}
|
|
64287
|
-
*/
|
|
64288
|
-
clearResponseCache: () => ipcRenderer$a.invoke(RESPONSE_CACHE_CLEAR),
|
|
64289
|
-
|
|
64290
|
-
/**
|
|
64291
|
-
* Get response cache statistics.
|
|
64292
|
-
*
|
|
64293
|
-
* @returns {Promise<{entries: number, inflight: number, keys: string[]}>}
|
|
64294
|
-
*/
|
|
64295
|
-
responseCacheStats: () => ipcRenderer$a.invoke(RESPONSE_CACHE_STATS),
|
|
64296
|
-
};
|
|
64297
|
-
|
|
64298
|
-
var clientCacheApi_1 = clientCacheApi$2;
|
|
64299
|
-
|
|
64300
64179
|
/**
|
|
64301
64180
|
* dashboardConfigApi.js
|
|
64302
64181
|
*
|
|
@@ -66231,7 +66110,6 @@ const openaiApi$1 = openaiApi_1;
|
|
|
66231
66110
|
const menuItemsApi$1 = menuItemsApi_1;
|
|
66232
66111
|
const pluginApi$1 = pluginApi_1;
|
|
66233
66112
|
const llmApi$1 = llmApi_1;
|
|
66234
|
-
const clientCacheApi$1 = clientCacheApi_1;
|
|
66235
66113
|
const dashboardConfigApi$1 = dashboardConfigApi_1;
|
|
66236
66114
|
const dashboardRatingsApi = dashboardRatingsApi_1;
|
|
66237
66115
|
const registryAuthApi$1 = registryAuthApi_1;
|
|
@@ -66311,7 +66189,6 @@ function createMainApi$1(extensions = {}) {
|
|
|
66311
66189
|
openai: openaiApi$1,
|
|
66312
66190
|
menuItems: menuItemsApi$1,
|
|
66313
66191
|
plugins: pluginApi$1,
|
|
66314
|
-
clientCache: clientCacheApi$1,
|
|
66315
66192
|
dashboardConfig: dashboardConfigApi$1,
|
|
66316
66193
|
dashboardRatings: dashboardRatingsApi,
|
|
66317
66194
|
registryAuth: registryAuthApi$1,
|
|
@@ -66409,7 +66286,6 @@ const openaiApi = openaiApi_1;
|
|
|
66409
66286
|
const menuItemsApi = menuItemsApi_1;
|
|
66410
66287
|
const pluginApi = pluginApi_1;
|
|
66411
66288
|
const llmApi = llmApi_1;
|
|
66412
|
-
const clientCacheApi = clientCacheApi_1;
|
|
66413
66289
|
const dashboardConfigApi = dashboardConfigApi_1;
|
|
66414
66290
|
const registryAuthApi = registryAuthApi_1;
|
|
66415
66291
|
const notificationApi = notificationApi_1;
|
|
@@ -66507,7 +66383,6 @@ var electron = {
|
|
|
66507
66383
|
menuItemsApi,
|
|
66508
66384
|
pluginApi,
|
|
66509
66385
|
llmApi,
|
|
66510
|
-
clientCacheApi,
|
|
66511
66386
|
dashboardConfigApi,
|
|
66512
66387
|
registryAuthApi,
|
|
66513
66388
|
notificationApi,
|