@trops/dash-core 0.1.610 → 0.1.612
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 +2147 -1430
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +369 -72
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +370 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -936,6 +936,8 @@ var MCP_GET_CATALOG_COMPLETE = "mcp:get-catalog:complete";
|
|
|
936
936
|
var MCP_GET_CATALOG_ERROR = "mcp:get-catalog:error";
|
|
937
937
|
var MCP_RUN_AUTH_COMPLETE = "mcp:run-auth:complete";
|
|
938
938
|
var MCP_RUN_AUTH_ERROR = "mcp:run-auth:error";
|
|
939
|
+
var MCP_AUTHORIZE_COMPLETE = "mcp:authorize:complete";
|
|
940
|
+
var MCP_AUTHORIZE_ERROR = "mcp:authorize:error";
|
|
939
941
|
|
|
940
942
|
var DATA_JSON_TO_CSV_FILE = "data-json-to-csv-file";
|
|
941
943
|
var DATA_JSON_TO_CSV_FILE_COMPLETE = "data-json-to-csv-file-complete";
|
|
@@ -1031,6 +1033,8 @@ var apiEvents = /*#__PURE__*/Object.freeze({
|
|
|
1031
1033
|
LAYOUT_LIST: LAYOUT_LIST,
|
|
1032
1034
|
LAYOUT_LIST_COMPLETE: LAYOUT_LIST_COMPLETE,
|
|
1033
1035
|
LAYOUT_LIST_ERROR: LAYOUT_LIST_ERROR,
|
|
1036
|
+
MCP_AUTHORIZE_COMPLETE: MCP_AUTHORIZE_COMPLETE,
|
|
1037
|
+
MCP_AUTHORIZE_ERROR: MCP_AUTHORIZE_ERROR,
|
|
1034
1038
|
MCP_CALL_TOOL_COMPLETE: MCP_CALL_TOOL_COMPLETE,
|
|
1035
1039
|
MCP_CALL_TOOL_ERROR: MCP_CALL_TOOL_ERROR,
|
|
1036
1040
|
MCP_GET_CATALOG_COMPLETE: MCP_GET_CATALOG_COMPLETE,
|
|
@@ -1635,9 +1639,10 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
|
|
|
1635
1639
|
var _this20 = this;
|
|
1636
1640
|
var workspaceId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
1637
1641
|
var pathScope = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
1642
|
+
var appId = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
|
|
1638
1643
|
if (this.api !== null) {
|
|
1639
1644
|
try {
|
|
1640
|
-
this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope).then(function (result) {
|
|
1645
|
+
this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
|
|
1641
1646
|
onSuccess(_this20.events.MCP_START_SERVER_COMPLETE, result);
|
|
1642
1647
|
})["catch"](function (error) {
|
|
1643
1648
|
onError(_this20.events.MCP_START_SERVER_ERROR, error);
|
|
@@ -1863,6 +1868,28 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
|
|
|
1863
1868
|
return false;
|
|
1864
1869
|
}
|
|
1865
1870
|
}
|
|
1871
|
+
}, {
|
|
1872
|
+
key: "mcpAuthorize",
|
|
1873
|
+
value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
|
|
1874
|
+
var _this30 = this;
|
|
1875
|
+
var appId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
1876
|
+
if (this.api !== null) {
|
|
1877
|
+
try {
|
|
1878
|
+
this.api.mcp.authorize(serverName, mcpConfig, credentials, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
|
|
1879
|
+
onSuccess(_this30.events.MCP_AUTHORIZE_COMPLETE, result);
|
|
1880
|
+
})["catch"](function (error) {
|
|
1881
|
+
onError(_this30.events.MCP_AUTHORIZE_ERROR, error);
|
|
1882
|
+
});
|
|
1883
|
+
return true;
|
|
1884
|
+
} catch (e) {
|
|
1885
|
+
onError(this.events.MCP_AUTHORIZE_ERROR, e);
|
|
1886
|
+
return false;
|
|
1887
|
+
}
|
|
1888
|
+
} else {
|
|
1889
|
+
onError(this.events.MCP_AUTHORIZE_ERROR, new Error("No Api found"));
|
|
1890
|
+
return false;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1866
1893
|
}]);
|
|
1867
1894
|
}();
|
|
1868
1895
|
|
|
@@ -2136,6 +2163,12 @@ var WebDashboardApi = /*#__PURE__*/function () {
|
|
|
2136
2163
|
onError === null || onError === void 0 ? void 0 : onError("mcp:run-auth:error", new Error("MCP not available in web mode"));
|
|
2137
2164
|
return false;
|
|
2138
2165
|
}
|
|
2166
|
+
}, {
|
|
2167
|
+
key: "mcpAuthorize",
|
|
2168
|
+
value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
|
|
2169
|
+
onError === null || onError === void 0 ? void 0 : onError("mcp:authorize:error", new Error("MCP not available in web mode"));
|
|
2170
|
+
return false;
|
|
2171
|
+
}
|
|
2139
2172
|
}]);
|
|
2140
2173
|
}();
|
|
2141
2174
|
|
|
@@ -33478,7 +33511,7 @@ var useMcpProvider = function useMcpProvider(providerType) {
|
|
|
33478
33511
|
consumerCount: 0
|
|
33479
33512
|
});
|
|
33480
33513
|
reject(err);
|
|
33481
|
-
}, workspaceId, pathScope);
|
|
33514
|
+
}, workspaceId, pathScope, app === null || app === void 0 ? void 0 : app.appId);
|
|
33482
33515
|
});
|
|
33483
33516
|
pendingConnects$1.set(stateKey, connectPromise);
|
|
33484
33517
|
_context.prev = 24;
|
|
@@ -43333,7 +43366,7 @@ var ProviderDetail = function ProviderDetail(_ref) {
|
|
|
43333
43366
|
});
|
|
43334
43367
|
};
|
|
43335
43368
|
|
|
43336
|
-
var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers"];
|
|
43369
|
+
var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers", "auth", "oauth"];
|
|
43337
43370
|
function ownKeys$v(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
43338
43371
|
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
43339
43372
|
var DirectoryListField = function DirectoryListField(_ref) {
|
|
@@ -43461,9 +43494,20 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43461
43494
|
args = _ref3.args,
|
|
43462
43495
|
envMappingRows = _ref3.envMappingRows,
|
|
43463
43496
|
url = _ref3.url,
|
|
43464
|
-
headerRows = _ref3.headerRows
|
|
43497
|
+
headerRows = _ref3.headerRows,
|
|
43498
|
+
_ref3$authType = _ref3.authType,
|
|
43499
|
+
authType = _ref3$authType === void 0 ? "apiKey" : _ref3$authType,
|
|
43500
|
+
_ref3$oauthScopes = _ref3.oauthScopes,
|
|
43501
|
+
oauthScopes = _ref3$oauthScopes === void 0 ? "" : _ref3$oauthScopes,
|
|
43502
|
+
_ref3$oauthClientId = _ref3.oauthClientId,
|
|
43503
|
+
oauthClientId = _ref3$oauthClientId === void 0 ? "" : _ref3$oauthClientId,
|
|
43504
|
+
_ref3$oauthClientSecr = _ref3.oauthClientSecret,
|
|
43505
|
+
oauthClientSecret = _ref3$oauthClientSecr === void 0 ? "" : _ref3$oauthClientSecr;
|
|
43465
43506
|
var baseConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
43466
43507
|
// Everything on baseConfig that the form doesn't own gets preserved.
|
|
43508
|
+
// `auth`/`oauth` are owned by the form's auth-type selector, so they're
|
|
43509
|
+
// excluded here and re-emitted below based on the current selection
|
|
43510
|
+
// (this is how toggling away from OAuth clears them).
|
|
43467
43511
|
baseConfig.transport;
|
|
43468
43512
|
baseConfig.command;
|
|
43469
43513
|
baseConfig.args;
|
|
@@ -43471,6 +43515,8 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43471
43515
|
baseConfig.url;
|
|
43472
43516
|
baseConfig.headerTemplate;
|
|
43473
43517
|
baseConfig.headers;
|
|
43518
|
+
baseConfig.auth;
|
|
43519
|
+
baseConfig.oauth;
|
|
43474
43520
|
var passThrough = _objectWithoutProperties(baseConfig, _excluded$1);
|
|
43475
43521
|
if (transport === "stdio") {
|
|
43476
43522
|
var envMapping = {};
|
|
@@ -43490,6 +43536,23 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43490
43536
|
}
|
|
43491
43537
|
|
|
43492
43538
|
// streamable_http
|
|
43539
|
+
var config = _objectSpread$v(_objectSpread$v({}, passThrough), {}, {
|
|
43540
|
+
transport: "streamable_http",
|
|
43541
|
+
url: url.trim()
|
|
43542
|
+
});
|
|
43543
|
+
if (authType === "oauth") {
|
|
43544
|
+
// Interactive OAuth 2.0 (SDK-native). Scopes optional; clientId/secret
|
|
43545
|
+
// only for servers without Dynamic Client Registration.
|
|
43546
|
+
config.auth = "oauth";
|
|
43547
|
+
var oauth = {};
|
|
43548
|
+
if (oauthScopes.trim()) oauth.scopes = oauthScopes.trim();
|
|
43549
|
+
if (oauthClientId.trim()) oauth.clientId = oauthClientId.trim();
|
|
43550
|
+
if (oauthClientSecret.trim()) oauth.clientSecret = oauthClientSecret.trim();
|
|
43551
|
+
config.oauth = oauth;
|
|
43552
|
+
return config;
|
|
43553
|
+
}
|
|
43554
|
+
|
|
43555
|
+
// apiKey (header template) — also the path for "none" (no headers added)
|
|
43493
43556
|
var headerTemplate = {};
|
|
43494
43557
|
headerRows.forEach(function (row) {
|
|
43495
43558
|
var name = row.headerName.trim();
|
|
@@ -43498,11 +43561,7 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43498
43561
|
headerTemplate[name] = value;
|
|
43499
43562
|
}
|
|
43500
43563
|
});
|
|
43501
|
-
|
|
43502
|
-
transport: "streamable_http",
|
|
43503
|
-
url: url.trim()
|
|
43504
|
-
});
|
|
43505
|
-
if (Object.keys(headerTemplate).length > 0) {
|
|
43564
|
+
if (authType === "apiKey" && Object.keys(headerTemplate).length > 0) {
|
|
43506
43565
|
config.headerTemplate = headerTemplate;
|
|
43507
43566
|
}
|
|
43508
43567
|
return config;
|
|
@@ -43531,7 +43590,7 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43531
43590
|
* preserved verbatim on save so editing never silently drops them.
|
|
43532
43591
|
*/
|
|
43533
43592
|
var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
43534
|
-
var _testResult$tools;
|
|
43593
|
+
var _initialMcpConfig$oau, _initialMcpConfig$oau2, _initialMcpConfig$oau3, _initialMcpConfig$oau4, _initialMcpConfig$oau5, _testResult$tools;
|
|
43535
43594
|
var onSave = _ref4.onSave,
|
|
43536
43595
|
onBack = _ref4.onBack,
|
|
43537
43596
|
_ref4$isEditMode = _ref4.isEditMode,
|
|
@@ -43617,41 +43676,67 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43617
43676
|
headerRows = _useState22[0],
|
|
43618
43677
|
setHeaderRows = _useState22[1];
|
|
43619
43678
|
|
|
43620
|
-
//
|
|
43621
|
-
var _useState23 = useState(
|
|
43679
|
+
// HTTP auth type: "none" | "apiKey" | "oauth"
|
|
43680
|
+
var _useState23 = useState(function () {
|
|
43681
|
+
var cfg = initialMcpConfig || {};
|
|
43682
|
+
if (cfg.auth === "oauth" || cfg.oauth) return "oauth";
|
|
43683
|
+
return "apiKey";
|
|
43684
|
+
}),
|
|
43622
43685
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
43623
|
-
|
|
43624
|
-
|
|
43625
|
-
|
|
43626
|
-
// Wizard step state
|
|
43627
|
-
var _useState25 = useState(0),
|
|
43686
|
+
authType = _useState24[0],
|
|
43687
|
+
setAuthType = _useState24[1];
|
|
43688
|
+
var _useState25 = useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau = initialMcpConfig.oauth) === null || _initialMcpConfig$oau === void 0 ? void 0 : _initialMcpConfig$oau.scopes) || ""),
|
|
43628
43689
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
43629
|
-
|
|
43630
|
-
|
|
43631
|
-
|
|
43632
|
-
// Auth state
|
|
43633
|
-
var _useState27 = useState(false),
|
|
43690
|
+
oauthScopes = _useState26[0],
|
|
43691
|
+
setOauthScopes = _useState26[1];
|
|
43692
|
+
var _useState27 = useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau2 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau2 === void 0 ? void 0 : _initialMcpConfig$oau2.clientId) || ""),
|
|
43634
43693
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
43635
|
-
|
|
43636
|
-
|
|
43637
|
-
var _useState29 = useState(null),
|
|
43694
|
+
oauthClientId = _useState28[0],
|
|
43695
|
+
setOauthClientId = _useState28[1];
|
|
43696
|
+
var _useState29 = useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau3 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau3 === void 0 ? void 0 : _initialMcpConfig$oau3.clientSecret) || ""),
|
|
43638
43697
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
43639
|
-
|
|
43640
|
-
|
|
43641
|
-
|
|
43642
|
-
// JSON editor state
|
|
43643
|
-
var _useState31 = useState("form"),
|
|
43698
|
+
oauthClientSecret = _useState30[0],
|
|
43699
|
+
setOauthClientSecret = _useState30[1];
|
|
43700
|
+
var _useState31 = useState(!!(initialMcpConfig !== null && initialMcpConfig !== void 0 && (_initialMcpConfig$oau4 = initialMcpConfig.oauth) !== null && _initialMcpConfig$oau4 !== void 0 && _initialMcpConfig$oau4.clientId || initialMcpConfig !== null && initialMcpConfig !== void 0 && (_initialMcpConfig$oau5 = initialMcpConfig.oauth) !== null && _initialMcpConfig$oau5 !== void 0 && _initialMcpConfig$oau5.clientSecret)),
|
|
43644
43701
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
43645
|
-
|
|
43646
|
-
|
|
43647
|
-
|
|
43702
|
+
showOauthAdvanced = _useState32[0],
|
|
43703
|
+
setShowOauthAdvanced = _useState32[1];
|
|
43704
|
+
|
|
43705
|
+
// Tool selection state
|
|
43706
|
+
var _useState33 = useState(initialAllowedTools),
|
|
43648
43707
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
43649
|
-
|
|
43650
|
-
|
|
43651
|
-
|
|
43708
|
+
selectedTools = _useState34[0],
|
|
43709
|
+
setSelectedTools = _useState34[1];
|
|
43710
|
+
|
|
43711
|
+
// Wizard step state
|
|
43712
|
+
var _useState35 = useState(0),
|
|
43652
43713
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
43653
|
-
|
|
43654
|
-
|
|
43714
|
+
wizardStep = _useState36[0],
|
|
43715
|
+
setWizardStep = _useState36[1];
|
|
43716
|
+
|
|
43717
|
+
// Auth state
|
|
43718
|
+
var _useState37 = useState(false),
|
|
43719
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
43720
|
+
isAuthorizing = _useState38[0],
|
|
43721
|
+
setIsAuthorizing = _useState38[1];
|
|
43722
|
+
var _useState39 = useState(null),
|
|
43723
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
43724
|
+
authResult = _useState40[0],
|
|
43725
|
+
setAuthResult = _useState40[1];
|
|
43726
|
+
|
|
43727
|
+
// JSON editor state
|
|
43728
|
+
var _useState41 = useState("form"),
|
|
43729
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
43730
|
+
viewMode = _useState42[0],
|
|
43731
|
+
setViewMode = _useState42[1]; // "form" | "json"
|
|
43732
|
+
var _useState43 = useState(""),
|
|
43733
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
43734
|
+
jsonText = _useState44[0],
|
|
43735
|
+
setJsonText = _useState44[1];
|
|
43736
|
+
var _useState45 = useState(null),
|
|
43737
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
43738
|
+
jsonError = _useState46[0],
|
|
43739
|
+
setJsonError = _useState46[1];
|
|
43655
43740
|
|
|
43656
43741
|
// Clear credential data when transport changes (derived fields change entirely)
|
|
43657
43742
|
// Only in create mode — in edit mode the initial transport is set correctly
|
|
@@ -43663,8 +43748,11 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43663
43748
|
}
|
|
43664
43749
|
}, [transport, isEditMode]);
|
|
43665
43750
|
|
|
43666
|
-
// Dynamic wizard steps based on whether auth is needed
|
|
43667
|
-
|
|
43751
|
+
// Dynamic wizard steps based on whether auth is needed. Either a
|
|
43752
|
+
// catalog-provided subprocess authCommand (legacy) or an OAuth 2.0
|
|
43753
|
+
// custom server adds an "Authorize" step before Test & Tools.
|
|
43754
|
+
var isOAuth = transport === "streamable_http" && authType === "oauth";
|
|
43755
|
+
var hasAuth = !!initialAuthCommand || isOAuth;
|
|
43668
43756
|
var wizardSteps = hasAuth ? ["configure", "authorize", "testTools"] : ["configure", "testTools"];
|
|
43669
43757
|
var totalSteps = wizardSteps.length;
|
|
43670
43758
|
var currentStepType = wizardSteps[wizardStep];
|
|
@@ -43693,9 +43781,13 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43693
43781
|
args: args,
|
|
43694
43782
|
envMappingRows: envMappingRows,
|
|
43695
43783
|
url: url,
|
|
43696
|
-
headerRows: headerRows
|
|
43784
|
+
headerRows: headerRows,
|
|
43785
|
+
authType: authType,
|
|
43786
|
+
oauthScopes: oauthScopes,
|
|
43787
|
+
oauthClientId: oauthClientId,
|
|
43788
|
+
oauthClientSecret: oauthClientSecret
|
|
43697
43789
|
}, initialMcpConfig || {});
|
|
43698
|
-
}, [transport, command, args, envMappingRows, url, headerRows, initialMcpConfig]);
|
|
43790
|
+
}, [transport, command, args, envMappingRows, url, headerRows, authType, oauthScopes, oauthClientId, oauthClientSecret, initialMcpConfig]);
|
|
43699
43791
|
|
|
43700
43792
|
// Invalidate test result when config changes after a test
|
|
43701
43793
|
var mcpConfigRef = useRef(mcpConfig);
|
|
@@ -43893,10 +43985,10 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43893
43985
|
|
|
43894
43986
|
// --- authorize (OAuth browser flow) ---
|
|
43895
43987
|
var handleAuthorize = function handleAuthorize() {
|
|
43896
|
-
if (!dashApi
|
|
43988
|
+
if (!dashApi) return;
|
|
43897
43989
|
setIsAuthorizing(true);
|
|
43898
43990
|
setAuthResult(null);
|
|
43899
|
-
|
|
43991
|
+
var onComplete = function onComplete(event, result) {
|
|
43900
43992
|
if (result.error) {
|
|
43901
43993
|
setAuthResult({
|
|
43902
43994
|
success: false,
|
|
@@ -43909,13 +44001,22 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43909
44001
|
});
|
|
43910
44002
|
}
|
|
43911
44003
|
setIsAuthorizing(false);
|
|
43912
|
-
}
|
|
44004
|
+
};
|
|
44005
|
+
var onFail = function onFail(event, err) {
|
|
43913
44006
|
setAuthResult({
|
|
43914
44007
|
success: false,
|
|
43915
44008
|
message: (err === null || err === void 0 ? void 0 : err.message) || "Authorization failed"
|
|
43916
44009
|
});
|
|
43917
44010
|
setIsAuthorizing(false);
|
|
43918
|
-
}
|
|
44011
|
+
};
|
|
44012
|
+
if (isOAuth) {
|
|
44013
|
+
// SDK-native OAuth 2.0: opens the system browser, persists tokens.
|
|
44014
|
+
dashApi.mcpAuthorize(providerName.trim() || "__test__custom", mcpConfig, credentialData, onComplete, onFail, appContext === null || appContext === void 0 ? void 0 : appContext.appId);
|
|
44015
|
+
return;
|
|
44016
|
+
}
|
|
44017
|
+
if (!initialAuthCommand) return;
|
|
44018
|
+
// Legacy catalog subprocess auth (e.g. bundled Google servers).
|
|
44019
|
+
dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, onComplete, onFail);
|
|
43919
44020
|
};
|
|
43920
44021
|
|
|
43921
44022
|
// --- save ---
|
|
@@ -44224,7 +44325,82 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
44224
44325
|
className: "text-sm text-red-400",
|
|
44225
44326
|
children: formErrors.url
|
|
44226
44327
|
})]
|
|
44227
|
-
}), /*#__PURE__*/
|
|
44328
|
+
}), /*#__PURE__*/jsx("div", {
|
|
44329
|
+
className: "flex flex-col gap-2",
|
|
44330
|
+
children: /*#__PURE__*/jsx(RadioGroup, {
|
|
44331
|
+
label: "Authentication",
|
|
44332
|
+
name: "mcp-http-auth-type",
|
|
44333
|
+
value: authType,
|
|
44334
|
+
onChange: function onChange(value) {
|
|
44335
|
+
setAuthType(value);
|
|
44336
|
+
setAuthResult(null);
|
|
44337
|
+
},
|
|
44338
|
+
options: [{
|
|
44339
|
+
value: "none",
|
|
44340
|
+
label: "None"
|
|
44341
|
+
}, {
|
|
44342
|
+
value: "apiKey",
|
|
44343
|
+
label: "API key (headers)"
|
|
44344
|
+
}, {
|
|
44345
|
+
value: "oauth",
|
|
44346
|
+
label: "OAuth 2.0 (browser sign-in)"
|
|
44347
|
+
}]
|
|
44348
|
+
})
|
|
44349
|
+
}), authType === "oauth" && /*#__PURE__*/jsxs("div", {
|
|
44350
|
+
className: "space-y-3",
|
|
44351
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
44352
|
+
className: "flex flex-col gap-2",
|
|
44353
|
+
children: [/*#__PURE__*/jsx(FormLabel, {
|
|
44354
|
+
label: "Scopes"
|
|
44355
|
+
}), /*#__PURE__*/jsx("p", {
|
|
44356
|
+
className: "text-sm opacity-50",
|
|
44357
|
+
children: "Space-separated OAuth scopes (optional \u2014 many servers grant defaults)."
|
|
44358
|
+
}), /*#__PURE__*/jsx(InputText, {
|
|
44359
|
+
value: oauthScopes,
|
|
44360
|
+
onChange: setOauthScopes,
|
|
44361
|
+
placeholder: "e.g., read write offline_access"
|
|
44362
|
+
})]
|
|
44363
|
+
}), /*#__PURE__*/jsxs("button", {
|
|
44364
|
+
type: "button",
|
|
44365
|
+
onClick: function onClick() {
|
|
44366
|
+
return setShowOauthAdvanced(function (v) {
|
|
44367
|
+
return !v;
|
|
44368
|
+
});
|
|
44369
|
+
},
|
|
44370
|
+
className: "text-sm text-blue-400 hover:text-blue-300 transition-colors flex items-center gap-1 self-start",
|
|
44371
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
44372
|
+
icon: showOauthAdvanced ? "chevron-down" : "chevron-right",
|
|
44373
|
+
className: "text-xs"
|
|
44374
|
+
}), /*#__PURE__*/jsx("span", {
|
|
44375
|
+
children: "Advanced: pre-registered client"
|
|
44376
|
+
})]
|
|
44377
|
+
}), showOauthAdvanced && /*#__PURE__*/jsxs("div", {
|
|
44378
|
+
className: "space-y-3 pl-1",
|
|
44379
|
+
children: [/*#__PURE__*/jsx("p", {
|
|
44380
|
+
className: "text-sm opacity-50",
|
|
44381
|
+
children: "Only needed for servers that don't support Dynamic Client Registration. Leave blank otherwise."
|
|
44382
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
44383
|
+
className: "flex flex-col gap-2",
|
|
44384
|
+
children: [/*#__PURE__*/jsx(FormLabel, {
|
|
44385
|
+
label: "Client ID"
|
|
44386
|
+
}), /*#__PURE__*/jsx(InputText, {
|
|
44387
|
+
value: oauthClientId,
|
|
44388
|
+
onChange: setOauthClientId,
|
|
44389
|
+
placeholder: "Client ID"
|
|
44390
|
+
})]
|
|
44391
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
44392
|
+
className: "flex flex-col gap-2",
|
|
44393
|
+
children: [/*#__PURE__*/jsx(FormLabel, {
|
|
44394
|
+
label: "Client secret"
|
|
44395
|
+
}), /*#__PURE__*/jsx(InputText, {
|
|
44396
|
+
type: "password",
|
|
44397
|
+
value: oauthClientSecret,
|
|
44398
|
+
onChange: setOauthClientSecret,
|
|
44399
|
+
placeholder: "Client secret (if required)"
|
|
44400
|
+
})]
|
|
44401
|
+
})]
|
|
44402
|
+
})]
|
|
44403
|
+
}), authType === "apiKey" && /*#__PURE__*/jsxs("div", {
|
|
44228
44404
|
className: "space-y-3",
|
|
44229
44405
|
children: [/*#__PURE__*/jsxs("div", {
|
|
44230
44406
|
children: [/*#__PURE__*/jsx(FormLabel, {
|
|
@@ -44365,7 +44541,7 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
44365
44541
|
className: "flex flex-col items-center justify-center py-8 space-y-4",
|
|
44366
44542
|
children: [/*#__PURE__*/jsx("p", {
|
|
44367
44543
|
className: "text-sm opacity-60 text-center max-w-md",
|
|
44368
|
-
children: "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
|
|
44544
|
+
children: isOAuth ? "This server uses OAuth 2.0. Click below to open your browser, sign in, and approve access. Dash stores the resulting tokens securely and refreshes them automatically." : "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
|
|
44369
44545
|
}), /*#__PURE__*/jsx(Button, {
|
|
44370
44546
|
title: isAuthorizing ? "Authorizing..." : "Authorize",
|
|
44371
44547
|
onClick: handleAuthorize,
|
|
@@ -44386,7 +44562,18 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
44386
44562
|
children: [/*#__PURE__*/jsx("p", {
|
|
44387
44563
|
className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
|
|
44388
44564
|
children: "Troubleshooting"
|
|
44389
|
-
}), /*#__PURE__*/jsxs("ul", {
|
|
44565
|
+
}), isOAuth ? /*#__PURE__*/jsxs("ul", {
|
|
44566
|
+
className: "text-sm opacity-60 space-y-1 list-disc list-inside",
|
|
44567
|
+
children: [/*#__PURE__*/jsx("li", {
|
|
44568
|
+
children: "Make sure a browser window opened \u2014 check for a blocked pop-up or default-browser prompt"
|
|
44569
|
+
}), /*#__PURE__*/jsx("li", {
|
|
44570
|
+
children: "Allow Dash to accept the local sign-in redirect if your firewall prompts"
|
|
44571
|
+
}), /*#__PURE__*/jsx("li", {
|
|
44572
|
+
children: "Verify the server URL is correct and the scopes are valid for this server"
|
|
44573
|
+
}), /*#__PURE__*/jsx("li", {
|
|
44574
|
+
children: "For servers without dynamic registration, set a Client ID under \"Advanced\""
|
|
44575
|
+
})]
|
|
44576
|
+
}) : /*#__PURE__*/jsxs("ul", {
|
|
44390
44577
|
className: "text-sm opacity-60 space-y-1 list-disc list-inside",
|
|
44391
44578
|
children: [/*#__PURE__*/jsx("li", {
|
|
44392
44579
|
children: "Ensure Node.js and npx are available in your PATH"
|
|
@@ -51991,18 +52178,35 @@ var McpServerSection = function McpServerSection() {
|
|
|
51991
52178
|
});
|
|
51992
52179
|
};
|
|
51993
52180
|
|
|
52181
|
+
/**
|
|
52182
|
+
* modelMigration.js (renderer mirror)
|
|
52183
|
+
*
|
|
52184
|
+
* Mirrors the retired-model map + default from the main-process provider
|
|
52185
|
+
* registry (electron/llm/modelProviders.js) so the Settings UI can detect a
|
|
52186
|
+
* stale saved selection, auto-migrate it, and show a notice — without an IPC
|
|
52187
|
+
* round-trip. KEEP IN SYNC with modelProviders.js (anthropic provider).
|
|
52188
|
+
*/
|
|
52189
|
+
var DEFAULT_MODEL = "claude-opus-4-8";
|
|
52190
|
+
var RETIRED_MODEL_MAP = {
|
|
52191
|
+
"claude-sonnet-4-20250514": "claude-sonnet-4-6",
|
|
52192
|
+
"claude-opus-4-20250514": "claude-opus-4-8",
|
|
52193
|
+
"claude-opus-4-1-20250805": "claude-opus-4-8",
|
|
52194
|
+
"claude-3-7-sonnet-20250219": "claude-sonnet-4-6",
|
|
52195
|
+
"claude-3-5-sonnet-20241022": "claude-sonnet-4-6",
|
|
52196
|
+
"claude-3-5-sonnet-20240620": "claude-sonnet-4-6",
|
|
52197
|
+
"claude-3-5-haiku-20241022": "claude-haiku-4-5",
|
|
52198
|
+
"claude-3-opus-20240229": "claude-opus-4-8"
|
|
52199
|
+
};
|
|
52200
|
+
function isRetiredModel(id) {
|
|
52201
|
+
return !!RETIRED_MODEL_MAP[id];
|
|
52202
|
+
}
|
|
52203
|
+
function migrateModelId(id) {
|
|
52204
|
+
if (!id) return DEFAULT_MODEL;
|
|
52205
|
+
return RETIRED_MODEL_MAP[id] || id;
|
|
52206
|
+
}
|
|
52207
|
+
|
|
51994
52208
|
function ownKeys$m(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
51995
52209
|
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
51996
|
-
var MODELS = [{
|
|
51997
|
-
value: "claude-sonnet-4-20250514",
|
|
51998
|
-
label: "Claude Sonnet 4"
|
|
51999
|
-
}, {
|
|
52000
|
-
value: "claude-opus-4-20250514",
|
|
52001
|
-
label: "Claude Opus 4"
|
|
52002
|
-
}, {
|
|
52003
|
-
value: "claude-haiku-4-5-20251001",
|
|
52004
|
-
label: "Claude Haiku 4.5"
|
|
52005
|
-
}];
|
|
52006
52210
|
var BACKENDS = [{
|
|
52007
52211
|
value: "claude-code",
|
|
52008
52212
|
label: "Claude Code CLI"
|
|
@@ -52011,6 +52215,7 @@ var BACKENDS = [{
|
|
|
52011
52215
|
label: "Anthropic API"
|
|
52012
52216
|
}];
|
|
52013
52217
|
var AiAssistantSection = function AiAssistantSection() {
|
|
52218
|
+
var _anthropicProvider$;
|
|
52014
52219
|
var appContext = useContext(AppContext);
|
|
52015
52220
|
var settings = (appContext === null || appContext === void 0 ? void 0 : appContext.settings) || {};
|
|
52016
52221
|
var providers = (appContext === null || appContext === void 0 ? void 0 : appContext.providers) || {};
|
|
@@ -52028,7 +52233,7 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52028
52233
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
52029
52234
|
preferredBackend = _useState4[0],
|
|
52030
52235
|
setPreferredBackend = _useState4[1];
|
|
52031
|
-
var _useState5 = useState(aiSettings.model ||
|
|
52236
|
+
var _useState5 = useState(aiSettings.model || DEFAULT_MODEL),
|
|
52032
52237
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
52033
52238
|
selectedModel = _useState6[0],
|
|
52034
52239
|
setSelectedModel = _useState6[1];
|
|
@@ -52045,6 +52250,21 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52045
52250
|
saveKeyStatus = _useState10[0],
|
|
52046
52251
|
setSaveKeyStatus = _useState10[1];
|
|
52047
52252
|
|
|
52253
|
+
// Provider-pluggable model discovery (live fetch + curated fallback)
|
|
52254
|
+
var _useState11 = useState([]),
|
|
52255
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
52256
|
+
availableModels = _useState12[0],
|
|
52257
|
+
setAvailableModels = _useState12[1];
|
|
52258
|
+
var _useState13 = useState(false),
|
|
52259
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
52260
|
+
modelsLoading = _useState14[0],
|
|
52261
|
+
setModelsLoading = _useState14[1];
|
|
52262
|
+
// One-time notice when a retired saved model was auto-migrated
|
|
52263
|
+
var _useState15 = useState(null),
|
|
52264
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
52265
|
+
migrationNotice = _useState16[0],
|
|
52266
|
+
setMigrationNotice = _useState16[1];
|
|
52267
|
+
|
|
52048
52268
|
// Find existing Anthropic provider
|
|
52049
52269
|
var anthropicProvider = Object.entries(providers).find(function (_ref) {
|
|
52050
52270
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
@@ -52053,6 +52273,9 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52053
52273
|
});
|
|
52054
52274
|
var hasAnthropicProvider = !!anthropicProvider;
|
|
52055
52275
|
var anthropicProviderName = anthropicProvider === null || anthropicProvider === void 0 ? void 0 : anthropicProvider[0];
|
|
52276
|
+
// Decrypted key (when AppContext exposes it) enables the live Models API
|
|
52277
|
+
// fetch; without it, listModels returns the curated fallback list.
|
|
52278
|
+
var anthropicApiKey = (anthropicProvider === null || anthropicProvider === void 0 || (_anthropicProvider$ = anthropicProvider[1]) === null || _anthropicProvider$ === void 0 || (_anthropicProvider$ = _anthropicProvider$.credentials) === null || _anthropicProvider$ === void 0 ? void 0 : _anthropicProvider$.apiKey) || null;
|
|
52056
52279
|
|
|
52057
52280
|
// Check CLI availability on mount
|
|
52058
52281
|
useEffect(function () {
|
|
@@ -52074,6 +52297,28 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52074
52297
|
}
|
|
52075
52298
|
}, []);
|
|
52076
52299
|
|
|
52300
|
+
// Fetch selectable models for the current provider. With an API key the
|
|
52301
|
+
// main process does a live Anthropic Models API fetch; otherwise it returns
|
|
52302
|
+
// the curated fallback. Provider is "anthropic" for both current backends.
|
|
52303
|
+
var fetchModels = useCallback(function () {
|
|
52304
|
+
var _window$mainApi2;
|
|
52305
|
+
if (!((_window$mainApi2 = window.mainApi) !== null && _window$mainApi2 !== void 0 && (_window$mainApi2 = _window$mainApi2.llm) !== null && _window$mainApi2 !== void 0 && _window$mainApi2.listModels)) return;
|
|
52306
|
+
setModelsLoading(true);
|
|
52307
|
+
window.mainApi.llm.listModels("anthropic", anthropicApiKey).then(function (res) {
|
|
52308
|
+
return setAvailableModels(res && res.models || []);
|
|
52309
|
+
})["catch"](function () {
|
|
52310
|
+
return setAvailableModels([]);
|
|
52311
|
+
})["finally"](function () {
|
|
52312
|
+
return setModelsLoading(false);
|
|
52313
|
+
});
|
|
52314
|
+
}, [anthropicApiKey]);
|
|
52315
|
+
|
|
52316
|
+
// Load models on mount and whenever the available API key changes (so the
|
|
52317
|
+
// list upgrades from curated → live once a key is configured).
|
|
52318
|
+
useEffect(function () {
|
|
52319
|
+
fetchModels();
|
|
52320
|
+
}, [fetchModels]);
|
|
52321
|
+
|
|
52077
52322
|
// Save AI settings to app settings
|
|
52078
52323
|
var saveAiSettings = useCallback(function (updates) {
|
|
52079
52324
|
if (appContext !== null && appContext !== void 0 && appContext.changeSettings) {
|
|
@@ -52084,6 +52329,24 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52084
52329
|
}));
|
|
52085
52330
|
}
|
|
52086
52331
|
}, [appContext]);
|
|
52332
|
+
|
|
52333
|
+
// Auto-migrate a retired saved model to its current replacement (one-time,
|
|
52334
|
+
// on mount) so an old selection can't 404 the assistant. Shows a notice.
|
|
52335
|
+
useEffect(function () {
|
|
52336
|
+
var saved = aiSettings.model;
|
|
52337
|
+
if (saved && isRetiredModel(saved)) {
|
|
52338
|
+
var replacement = migrateModelId(saved);
|
|
52339
|
+
setSelectedModel(replacement);
|
|
52340
|
+
saveAiSettings({
|
|
52341
|
+
model: replacement
|
|
52342
|
+
});
|
|
52343
|
+
setMigrationNotice({
|
|
52344
|
+
from: saved,
|
|
52345
|
+
to: replacement
|
|
52346
|
+
});
|
|
52347
|
+
}
|
|
52348
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52349
|
+
}, []);
|
|
52087
52350
|
function handleBackendChange(e) {
|
|
52088
52351
|
var value = e.target.value;
|
|
52089
52352
|
setPreferredBackend(value);
|
|
@@ -52127,6 +52390,15 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52127
52390
|
});
|
|
52128
52391
|
}
|
|
52129
52392
|
|
|
52393
|
+
// Model dropdown options — keep the current selection selectable even if it
|
|
52394
|
+
// isn't in the fetched list (e.g. a pinned/custom id).
|
|
52395
|
+
var modelOptions = selectedModel && !availableModels.some(function (m) {
|
|
52396
|
+
return m.value === selectedModel;
|
|
52397
|
+
}) ? [{
|
|
52398
|
+
value: selectedModel,
|
|
52399
|
+
label: selectedModel
|
|
52400
|
+
}].concat(_toConsumableArray(availableModels)) : availableModels;
|
|
52401
|
+
|
|
52130
52402
|
// Determine effective backend (what will actually be used)
|
|
52131
52403
|
var effectiveBackend = preferredBackend === "claude-code" && cliStatus !== null && cliStatus !== void 0 && cliStatus.available ? "claude-code" : preferredBackend === "anthropic" && hasAnthropicProvider ? "anthropic" : cliStatus !== null && cliStatus !== void 0 && cliStatus.available ? "claude-code" : hasAnthropicProvider ? "anthropic" : null;
|
|
52132
52404
|
return /*#__PURE__*/jsxs("div", {
|
|
@@ -52223,6 +52495,18 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52223
52495
|
}, b.value);
|
|
52224
52496
|
})
|
|
52225
52497
|
})]
|
|
52498
|
+
}), migrationNotice && /*#__PURE__*/jsxs("div", {
|
|
52499
|
+
className: "flex items-start gap-2 rounded-lg bg-yellow-900/30 border border-yellow-700 px-3 py-2 text-xs text-yellow-300",
|
|
52500
|
+
children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
52501
|
+
icon: "exclamation-triangle",
|
|
52502
|
+
className: "h-3.5 w-3.5 mt-0.5"
|
|
52503
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
52504
|
+
children: ["Your previously selected model (", /*#__PURE__*/jsx("code", {
|
|
52505
|
+
children: migrationNotice.from
|
|
52506
|
+
}), ") is no longer available. Switched to ", /*#__PURE__*/jsx("code", {
|
|
52507
|
+
children: migrationNotice.to
|
|
52508
|
+
}), "."]
|
|
52509
|
+
})]
|
|
52226
52510
|
}), /*#__PURE__*/jsxs("div", {
|
|
52227
52511
|
className: "flex flex-row items-center justify-between py-1",
|
|
52228
52512
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -52232,18 +52516,31 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52232
52516
|
children: "Model"
|
|
52233
52517
|
}), /*#__PURE__*/jsx("span", {
|
|
52234
52518
|
className: "text-xs opacity-50",
|
|
52235
|
-
children: "
|
|
52519
|
+
children: "Model for AI Assistant conversations"
|
|
52520
|
+
})]
|
|
52521
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
52522
|
+
className: "flex items-center gap-2",
|
|
52523
|
+
children: [/*#__PURE__*/jsx("select", {
|
|
52524
|
+
value: selectedModel,
|
|
52525
|
+
onChange: handleModelChange,
|
|
52526
|
+
className: "bg-white/10 border border-white/10 rounded-md px-3 py-1.5 text-sm text-gray-200 focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
52527
|
+
children: modelOptions.map(function (m) {
|
|
52528
|
+
return /*#__PURE__*/jsx("option", {
|
|
52529
|
+
value: m.value,
|
|
52530
|
+
children: m.label
|
|
52531
|
+
}, m.value);
|
|
52532
|
+
})
|
|
52533
|
+
}), /*#__PURE__*/jsx("button", {
|
|
52534
|
+
type: "button",
|
|
52535
|
+
onClick: fetchModels,
|
|
52536
|
+
disabled: modelsLoading,
|
|
52537
|
+
title: "Refresh available models",
|
|
52538
|
+
className: "text-gray-400 hover:text-gray-200 disabled:opacity-40 transition-colors p-1.5",
|
|
52539
|
+
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
52540
|
+
icon: "rotate",
|
|
52541
|
+
className: "h-3.5 w-3.5 ".concat(modelsLoading ? "animate-spin" : "")
|
|
52542
|
+
})
|
|
52236
52543
|
})]
|
|
52237
|
-
}), /*#__PURE__*/jsx("select", {
|
|
52238
|
-
value: selectedModel,
|
|
52239
|
-
onChange: handleModelChange,
|
|
52240
|
-
className: "bg-white/10 border border-white/10 rounded-md px-3 py-1.5 text-sm text-gray-200 focus:outline-none focus:ring-1 focus:ring-blue-500",
|
|
52241
|
-
children: MODELS.map(function (m) {
|
|
52242
|
-
return /*#__PURE__*/jsx("option", {
|
|
52243
|
-
value: m.value,
|
|
52244
|
-
children: m.label
|
|
52245
|
-
}, m.value);
|
|
52246
|
-
})
|
|
52247
52544
|
})]
|
|
52248
52545
|
})]
|
|
52249
52546
|
}), !hasAnthropicProvider && /*#__PURE__*/jsxs("div", {
|
|
@@ -68349,5 +68646,5 @@ function computeDashboardPreflight(_ref) {
|
|
|
68349
68646
|
|
|
68350
68647
|
ComponentManager.registerContainerTypes(LayoutContainer, LayoutGridContainer);
|
|
68351
68648
|
|
|
68352
|
-
export { ALGOLIA_ANALYTICS_FOR_QUERY, ALGOLIA_ANALYTICS_FOR_QUERY_COMPLETE, ALGOLIA_ANALYTICS_FOR_QUERY_ERROR, ALGOLIA_LIST_INDICES, ALGOLIA_LIST_INDICES_COMPLETE, ALGOLIA_LIST_INDICES_ERROR, AVAILABLE_COLORS, AddMenuItemModal, AdvancedMcpConfig, AppContext, AppSettingsModal, AppThemeScope, AppWrapper, CHOOSE_FILE, CHOOSE_FILE_COMPLETE, CHOOSE_FILE_ERROR, ChatCore, ChatInput, ChatMessages, ColorModel, ComponentConfigModel, ComponentManager, ContextModel, DATA_JSON_TO_CSV_FILE, DATA_JSON_TO_CSV_FILE_COMPLETE, DATA_JSON_TO_CSV_FILE_ERROR, DATA_JSON_TO_CSV_STRING, DATA_JSON_TO_CSV_STRING_COMPLETE, DATA_JSON_TO_CSV_STRING_ERROR, DATA_READ_FROM_FILE, DATA_READ_FROM_FILE_COMPLETE, DATA_READ_FROM_FILE_ERROR, DATA_SAVE_TO_FILE, DATA_SAVE_TO_FILE_COMPLETE, DATA_SAVE_TO_FILE_ERROR, DashCommandPalette, DashNavbar, DashSidebar, DashTabBar, DashboardStage as Dashboard, DashboardActionsApi, DashboardApi, DashboardContext, DashboardFooter, DashboardHeader, DashboardMenuItem, DashboardModel, DashboardMonitor, DashboardPublisher, DashboardStage, DashboardThemeProvider, DashboardWizardModal, DashboardWrapper, ElectronDashboardApi, ErrorBoundary, ExternalWidget, GRID_CELL_WIDGET_TYPE, HARMONY_STRATEGIES, LAYOUT_LIST, LAYOUT_LIST_COMPLETE, LAYOUT_LIST_ERROR, Layout, LayoutBuilder, LayoutBuilderAddItemModal, LayoutBuilderConfigContainerMenuItem, LayoutBuilderConfigMenuItem, LayoutBuilderConfigModal, LayoutBuilderEditItemModal, LayoutBuilderEventModal, LayoutBuilderGridItem, LayoutContainer, LayoutDragBuilder, LayoutDragBuilderEdit, LayoutGridContainer, LayoutManagerModal, LayoutModel, LayoutQuickAddMenu, MCP_CALL_TOOL_COMPLETE, MCP_CALL_TOOL_ERROR, MCP_GET_CATALOG_COMPLETE, MCP_GET_CATALOG_ERROR, MCP_LIST_RESOURCES_COMPLETE, MCP_LIST_RESOURCES_ERROR, MCP_LIST_TOOLS_COMPLETE, MCP_LIST_TOOLS_ERROR, MCP_READ_RESOURCE_COMPLETE, MCP_READ_RESOURCE_ERROR, MCP_RUN_AUTH_COMPLETE, MCP_RUN_AUTH_ERROR, MCP_SERVER_STATUS_COMPLETE, MCP_SERVER_STATUS_ERROR, MCP_START_SERVER_COMPLETE, MCP_START_SERVER_ERROR, MCP_STOP_SERVER_COMPLETE, MCP_STOP_SERVER_ERROR, MENU_ITEMS_DELETE, MENU_ITEMS_DELETE_COMPLETE, MENU_ITEMS_DELETE_ERROR, MENU_ITEMS_LIST, MENU_ITEMS_LIST_COMPLETE, MENU_ITEMS_LIST_ERROR, MENU_ITEMS_SAVE, MENU_ITEMS_SAVE_COMPLETE, MENU_ITEMS_SAVE_ERROR, MainMenu, MainMenuItem, MainMenuSection, MarkdownFormEditor, McpServerPicker, MenuItemModel, MenuSlideOverlay, MergeCellsModal, MessageBubble, MissingProviderPrompt, MockDashboardApi, PROVIDER_DELETE_COMPLETE, PROVIDER_DELETE_ERROR, PROVIDER_GET_COMPLETE, PROVIDER_GET_ERROR, PROVIDER_LIST_COMPLETE, PROVIDER_LIST_ERROR, PROVIDER_SAVE_COMPLETE, PROVIDER_SAVE_ERROR, PageTabBar, PanelCode, PanelEditItem, PanelEditItemHandlers, PanelEditItemNotifications, PanelEditItemProviders, PinnedSidebar, ProviderContext, ProviderErrorBoundary, ProviderForm, ProviderSelector, SECURE_STORAGE_ENCRYPT_STRING, SECURE_STORAGE_ENCRYPT_STRING_COMPLETE, SECURE_STORAGE_ENCRYPT_STRING_ERROR, SECURE_STORE_ENCRYPTION_CHECK, SECURE_STORE_ENCRYPTION_CHECK_COMPLETE, SECURE_STORE_ENCRYPTION_CHECK_ERROR, SECURE_STORE_GET_DATA, SECURE_STORE_GET_DATA_COMPLETE, SECURE_STORE_GET_DATA_ERROR, SECURE_STORE_SET_DATA, SECURE_STORE_SET_DATA_COMPLETE, SECURE_STORE_SET_DATA_ERROR, SETTINGS_GET, SETTINGS_GET_COMPLETE, SETTINGS_GET_ERROR, SETTINGS_SAVE, SETTINGS_SAVE_COMPLETE, SETTINGS_SAVE_ERROR, SIDEBAR_WIDGET_TYPE, SettingsModel, SideMenu, SplitCellModal, StreamingText, THEME_DELETE, THEME_DELETE_COMPLETE, THEME_DELETE_ERROR, THEME_EXTRACT_FROM_URL, THEME_EXTRACT_FROM_URL_COMPLETE, THEME_EXTRACT_FROM_URL_ERROR, THEME_LIST, THEME_LIST_COMPLETE, THEME_LIST_ERROR, THEME_MAP_PALETTE, THEME_MAP_PALETTE_COMPLETE, THEME_MAP_PALETTE_ERROR, THEME_SAVE, THEME_SAVE_COMPLETE, THEME_SAVE_ERROR, ThemeApi, ThemeColorDots, ThemeManagerModal, ThemeModel, ThemeWrapper, ToolCallBlock, ToolSelector, WELCOME_STORAGE_KEY, WORKSPACE_DELETE, WORKSPACE_DELETE_COMPLETE, WORKSPACE_DELETE_ERROR, WORKSPACE_LIST, WORKSPACE_LIST_COMPLETE, WORKSPACE_LIST_ERROR, WORKSPACE_SAVE, WORKSPACE_SAVE_COMPLETE, WORKSPACE_SAVE_ERROR, WebDashboardApi, WelcomePrompt, Widget, WidgetApi, WidgetConfigPanel, WidgetContext, WidgetFactory, WidgetNotFound, WidgetPopoutStage, WidgetProviderWrapper, WidgetSidebar, WizardCustomizeStep, WizardDiscoverStep, Workspace, WorkspaceContext, WorkspaceFooter, WorkspaceMenu, WorkspaceModel, WorkspaceScopeContext, addChildToLayoutItem, addItemToItemLayout, bareComponentName, buildMcpConfigFromOverrides, canHaveChildren, changeDirectionForLayoutItem, computeDashboardPreflight, createProviderRegistry, deriveFormFields, envMappingToRows, evaluateBundle, extractWidgetConfigs, formStateToMcpJson, formatFieldName, generateCustomTheme, generateHarmonyTheme, generateRandomHexTheme, generateRandomTheme, generateThemeName, getBorderStyle, getBrandPresets, getChildrenForLayoutItem, getComponentInLayout, getContainerBorderColor, getContainerColor, getIndexOfLayoutChildrenForItem, getIndexOfLayoutItem, getLayoutItemById, getLayoutItemForWorkspace, getNearestParentWorkspace, getNextHighestId, getNextHighestItemInLayout, getNextHighestOrder, getNextHighestParentId, getNextLowestItemInLayout, getParentForLayoutItem, getParentWorkspaceForItem, getThemePresets, getUserConfigurableProviders, getWidgetsForWorkspace, getWorkspacesForWorkspace, headerTemplateToRows, humanizeAction, isContainer, isLikelySecret, isMaxOrderForItem, isMinOrderForItem, isWidget, isWidgetResolvable, isWorkspace, layoutItemHasWorkspaceAsChild, loadWidgetBundle, makeScopedComponentId, mcpJsonToFormState, moveWidgetAcrossContainers, numChildrenForLayout, parse, parseScopedComponentId, removeItemFromLayout, renderComponent, renderGridLayout, renderGridLayoutFlow, _renderLayout as renderLayout, renderLayoutMenu, replaceItemInLayout, resolveIcon, serialize, setHostModules, traverseParentTree, updateLayoutItem, updateParentForItem, useDashboard, useMcpDashServer, useMcpProvider, useNotifications, useProvider, useProviderClient, useScheduler, useWebSocketProvider, useWidgetEvents, useWidgetProviders, useWidgetRegistryVersion, useWidgetSchedulerStatus, useWizardState, validateCellMerge, validateGridCell, validateGridPlacement, validateWidgetPlacement, widgetCountToTemplate, withProviderDetection };
|
|
68649
|
+
export { ALGOLIA_ANALYTICS_FOR_QUERY, ALGOLIA_ANALYTICS_FOR_QUERY_COMPLETE, ALGOLIA_ANALYTICS_FOR_QUERY_ERROR, ALGOLIA_LIST_INDICES, ALGOLIA_LIST_INDICES_COMPLETE, ALGOLIA_LIST_INDICES_ERROR, AVAILABLE_COLORS, AddMenuItemModal, AdvancedMcpConfig, AppContext, AppSettingsModal, AppThemeScope, AppWrapper, CHOOSE_FILE, CHOOSE_FILE_COMPLETE, CHOOSE_FILE_ERROR, ChatCore, ChatInput, ChatMessages, ColorModel, ComponentConfigModel, ComponentManager, ContextModel, DATA_JSON_TO_CSV_FILE, DATA_JSON_TO_CSV_FILE_COMPLETE, DATA_JSON_TO_CSV_FILE_ERROR, DATA_JSON_TO_CSV_STRING, DATA_JSON_TO_CSV_STRING_COMPLETE, DATA_JSON_TO_CSV_STRING_ERROR, DATA_READ_FROM_FILE, DATA_READ_FROM_FILE_COMPLETE, DATA_READ_FROM_FILE_ERROR, DATA_SAVE_TO_FILE, DATA_SAVE_TO_FILE_COMPLETE, DATA_SAVE_TO_FILE_ERROR, DashCommandPalette, DashNavbar, DashSidebar, DashTabBar, DashboardStage as Dashboard, DashboardActionsApi, DashboardApi, DashboardContext, DashboardFooter, DashboardHeader, DashboardMenuItem, DashboardModel, DashboardMonitor, DashboardPublisher, DashboardStage, DashboardThemeProvider, DashboardWizardModal, DashboardWrapper, ElectronDashboardApi, ErrorBoundary, ExternalWidget, GRID_CELL_WIDGET_TYPE, HARMONY_STRATEGIES, LAYOUT_LIST, LAYOUT_LIST_COMPLETE, LAYOUT_LIST_ERROR, Layout, LayoutBuilder, LayoutBuilderAddItemModal, LayoutBuilderConfigContainerMenuItem, LayoutBuilderConfigMenuItem, LayoutBuilderConfigModal, LayoutBuilderEditItemModal, LayoutBuilderEventModal, LayoutBuilderGridItem, LayoutContainer, LayoutDragBuilder, LayoutDragBuilderEdit, LayoutGridContainer, LayoutManagerModal, LayoutModel, LayoutQuickAddMenu, MCP_AUTHORIZE_COMPLETE, MCP_AUTHORIZE_ERROR, MCP_CALL_TOOL_COMPLETE, MCP_CALL_TOOL_ERROR, MCP_GET_CATALOG_COMPLETE, MCP_GET_CATALOG_ERROR, MCP_LIST_RESOURCES_COMPLETE, MCP_LIST_RESOURCES_ERROR, MCP_LIST_TOOLS_COMPLETE, MCP_LIST_TOOLS_ERROR, MCP_READ_RESOURCE_COMPLETE, MCP_READ_RESOURCE_ERROR, MCP_RUN_AUTH_COMPLETE, MCP_RUN_AUTH_ERROR, MCP_SERVER_STATUS_COMPLETE, MCP_SERVER_STATUS_ERROR, MCP_START_SERVER_COMPLETE, MCP_START_SERVER_ERROR, MCP_STOP_SERVER_COMPLETE, MCP_STOP_SERVER_ERROR, MENU_ITEMS_DELETE, MENU_ITEMS_DELETE_COMPLETE, MENU_ITEMS_DELETE_ERROR, MENU_ITEMS_LIST, MENU_ITEMS_LIST_COMPLETE, MENU_ITEMS_LIST_ERROR, MENU_ITEMS_SAVE, MENU_ITEMS_SAVE_COMPLETE, MENU_ITEMS_SAVE_ERROR, MainMenu, MainMenuItem, MainMenuSection, MarkdownFormEditor, McpServerPicker, MenuItemModel, MenuSlideOverlay, MergeCellsModal, MessageBubble, MissingProviderPrompt, MockDashboardApi, PROVIDER_DELETE_COMPLETE, PROVIDER_DELETE_ERROR, PROVIDER_GET_COMPLETE, PROVIDER_GET_ERROR, PROVIDER_LIST_COMPLETE, PROVIDER_LIST_ERROR, PROVIDER_SAVE_COMPLETE, PROVIDER_SAVE_ERROR, PageTabBar, PanelCode, PanelEditItem, PanelEditItemHandlers, PanelEditItemNotifications, PanelEditItemProviders, PinnedSidebar, ProviderContext, ProviderErrorBoundary, ProviderForm, ProviderSelector, SECURE_STORAGE_ENCRYPT_STRING, SECURE_STORAGE_ENCRYPT_STRING_COMPLETE, SECURE_STORAGE_ENCRYPT_STRING_ERROR, SECURE_STORE_ENCRYPTION_CHECK, SECURE_STORE_ENCRYPTION_CHECK_COMPLETE, SECURE_STORE_ENCRYPTION_CHECK_ERROR, SECURE_STORE_GET_DATA, SECURE_STORE_GET_DATA_COMPLETE, SECURE_STORE_GET_DATA_ERROR, SECURE_STORE_SET_DATA, SECURE_STORE_SET_DATA_COMPLETE, SECURE_STORE_SET_DATA_ERROR, SETTINGS_GET, SETTINGS_GET_COMPLETE, SETTINGS_GET_ERROR, SETTINGS_SAVE, SETTINGS_SAVE_COMPLETE, SETTINGS_SAVE_ERROR, SIDEBAR_WIDGET_TYPE, SettingsModel, SideMenu, SplitCellModal, StreamingText, THEME_DELETE, THEME_DELETE_COMPLETE, THEME_DELETE_ERROR, THEME_EXTRACT_FROM_URL, THEME_EXTRACT_FROM_URL_COMPLETE, THEME_EXTRACT_FROM_URL_ERROR, THEME_LIST, THEME_LIST_COMPLETE, THEME_LIST_ERROR, THEME_MAP_PALETTE, THEME_MAP_PALETTE_COMPLETE, THEME_MAP_PALETTE_ERROR, THEME_SAVE, THEME_SAVE_COMPLETE, THEME_SAVE_ERROR, ThemeApi, ThemeColorDots, ThemeManagerModal, ThemeModel, ThemeWrapper, ToolCallBlock, ToolSelector, WELCOME_STORAGE_KEY, WORKSPACE_DELETE, WORKSPACE_DELETE_COMPLETE, WORKSPACE_DELETE_ERROR, WORKSPACE_LIST, WORKSPACE_LIST_COMPLETE, WORKSPACE_LIST_ERROR, WORKSPACE_SAVE, WORKSPACE_SAVE_COMPLETE, WORKSPACE_SAVE_ERROR, WebDashboardApi, WelcomePrompt, Widget, WidgetApi, WidgetConfigPanel, WidgetContext, WidgetFactory, WidgetNotFound, WidgetPopoutStage, WidgetProviderWrapper, WidgetSidebar, WizardCustomizeStep, WizardDiscoverStep, Workspace, WorkspaceContext, WorkspaceFooter, WorkspaceMenu, WorkspaceModel, WorkspaceScopeContext, addChildToLayoutItem, addItemToItemLayout, bareComponentName, buildMcpConfigFromOverrides, canHaveChildren, changeDirectionForLayoutItem, computeDashboardPreflight, createProviderRegistry, deriveFormFields, envMappingToRows, evaluateBundle, extractWidgetConfigs, formStateToMcpJson, formatFieldName, generateCustomTheme, generateHarmonyTheme, generateRandomHexTheme, generateRandomTheme, generateThemeName, getBorderStyle, getBrandPresets, getChildrenForLayoutItem, getComponentInLayout, getContainerBorderColor, getContainerColor, getIndexOfLayoutChildrenForItem, getIndexOfLayoutItem, getLayoutItemById, getLayoutItemForWorkspace, getNearestParentWorkspace, getNextHighestId, getNextHighestItemInLayout, getNextHighestOrder, getNextHighestParentId, getNextLowestItemInLayout, getParentForLayoutItem, getParentWorkspaceForItem, getThemePresets, getUserConfigurableProviders, getWidgetsForWorkspace, getWorkspacesForWorkspace, headerTemplateToRows, humanizeAction, isContainer, isLikelySecret, isMaxOrderForItem, isMinOrderForItem, isWidget, isWidgetResolvable, isWorkspace, layoutItemHasWorkspaceAsChild, loadWidgetBundle, makeScopedComponentId, mcpJsonToFormState, moveWidgetAcrossContainers, numChildrenForLayout, parse, parseScopedComponentId, removeItemFromLayout, renderComponent, renderGridLayout, renderGridLayoutFlow, _renderLayout as renderLayout, renderLayoutMenu, replaceItemInLayout, resolveIcon, serialize, setHostModules, traverseParentTree, updateLayoutItem, updateParentForItem, useDashboard, useMcpDashServer, useMcpProvider, useNotifications, useProvider, useProviderClient, useScheduler, useWebSocketProvider, useWidgetEvents, useWidgetProviders, useWidgetRegistryVersion, useWidgetSchedulerStatus, useWizardState, validateCellMerge, validateGridCell, validateGridPlacement, validateWidgetPlacement, widgetCountToTemplate, withProviderDetection };
|
|
68353
68650
|
//# sourceMappingURL=index.esm.js.map
|