@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.js
CHANGED
|
@@ -954,6 +954,8 @@ var MCP_GET_CATALOG_COMPLETE = "mcp:get-catalog:complete";
|
|
|
954
954
|
var MCP_GET_CATALOG_ERROR = "mcp:get-catalog:error";
|
|
955
955
|
var MCP_RUN_AUTH_COMPLETE = "mcp:run-auth:complete";
|
|
956
956
|
var MCP_RUN_AUTH_ERROR = "mcp:run-auth:error";
|
|
957
|
+
var MCP_AUTHORIZE_COMPLETE = "mcp:authorize:complete";
|
|
958
|
+
var MCP_AUTHORIZE_ERROR = "mcp:authorize:error";
|
|
957
959
|
|
|
958
960
|
var DATA_JSON_TO_CSV_FILE = "data-json-to-csv-file";
|
|
959
961
|
var DATA_JSON_TO_CSV_FILE_COMPLETE = "data-json-to-csv-file-complete";
|
|
@@ -1049,6 +1051,8 @@ var apiEvents = /*#__PURE__*/Object.freeze({
|
|
|
1049
1051
|
LAYOUT_LIST: LAYOUT_LIST,
|
|
1050
1052
|
LAYOUT_LIST_COMPLETE: LAYOUT_LIST_COMPLETE,
|
|
1051
1053
|
LAYOUT_LIST_ERROR: LAYOUT_LIST_ERROR,
|
|
1054
|
+
MCP_AUTHORIZE_COMPLETE: MCP_AUTHORIZE_COMPLETE,
|
|
1055
|
+
MCP_AUTHORIZE_ERROR: MCP_AUTHORIZE_ERROR,
|
|
1052
1056
|
MCP_CALL_TOOL_COMPLETE: MCP_CALL_TOOL_COMPLETE,
|
|
1053
1057
|
MCP_CALL_TOOL_ERROR: MCP_CALL_TOOL_ERROR,
|
|
1054
1058
|
MCP_GET_CATALOG_COMPLETE: MCP_GET_CATALOG_COMPLETE,
|
|
@@ -1653,9 +1657,10 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
|
|
|
1653
1657
|
var _this20 = this;
|
|
1654
1658
|
var workspaceId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
1655
1659
|
var pathScope = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
1660
|
+
var appId = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;
|
|
1656
1661
|
if (this.api !== null) {
|
|
1657
1662
|
try {
|
|
1658
|
-
this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope).then(function (result) {
|
|
1663
|
+
this.api.mcp.startServer(serverName, mcpConfig, credentials, workspaceId, pathScope, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
|
|
1659
1664
|
onSuccess(_this20.events.MCP_START_SERVER_COMPLETE, result);
|
|
1660
1665
|
})["catch"](function (error) {
|
|
1661
1666
|
onError(_this20.events.MCP_START_SERVER_ERROR, error);
|
|
@@ -1881,6 +1886,28 @@ var ElectronDashboardApi = /*#__PURE__*/function () {
|
|
|
1881
1886
|
return false;
|
|
1882
1887
|
}
|
|
1883
1888
|
}
|
|
1889
|
+
}, {
|
|
1890
|
+
key: "mcpAuthorize",
|
|
1891
|
+
value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
|
|
1892
|
+
var _this30 = this;
|
|
1893
|
+
var appId = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
1894
|
+
if (this.api !== null) {
|
|
1895
|
+
try {
|
|
1896
|
+
this.api.mcp.authorize(serverName, mcpConfig, credentials, appId !== null && appId !== void 0 ? appId : this.appId).then(function (result) {
|
|
1897
|
+
onSuccess(_this30.events.MCP_AUTHORIZE_COMPLETE, result);
|
|
1898
|
+
})["catch"](function (error) {
|
|
1899
|
+
onError(_this30.events.MCP_AUTHORIZE_ERROR, error);
|
|
1900
|
+
});
|
|
1901
|
+
return true;
|
|
1902
|
+
} catch (e) {
|
|
1903
|
+
onError(this.events.MCP_AUTHORIZE_ERROR, e);
|
|
1904
|
+
return false;
|
|
1905
|
+
}
|
|
1906
|
+
} else {
|
|
1907
|
+
onError(this.events.MCP_AUTHORIZE_ERROR, new Error("No Api found"));
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1884
1911
|
}]);
|
|
1885
1912
|
}();
|
|
1886
1913
|
|
|
@@ -2154,6 +2181,12 @@ var WebDashboardApi = /*#__PURE__*/function () {
|
|
|
2154
2181
|
onError === null || onError === void 0 ? void 0 : onError("mcp:run-auth:error", new Error("MCP not available in web mode"));
|
|
2155
2182
|
return false;
|
|
2156
2183
|
}
|
|
2184
|
+
}, {
|
|
2185
|
+
key: "mcpAuthorize",
|
|
2186
|
+
value: function mcpAuthorize(serverName, mcpConfig, credentials, onSuccess, onError) {
|
|
2187
|
+
onError === null || onError === void 0 ? void 0 : onError("mcp:authorize:error", new Error("MCP not available in web mode"));
|
|
2188
|
+
return false;
|
|
2189
|
+
}
|
|
2157
2190
|
}]);
|
|
2158
2191
|
}();
|
|
2159
2192
|
|
|
@@ -33496,7 +33529,7 @@ var useMcpProvider = function useMcpProvider(providerType) {
|
|
|
33496
33529
|
consumerCount: 0
|
|
33497
33530
|
});
|
|
33498
33531
|
reject(err);
|
|
33499
|
-
}, workspaceId, pathScope);
|
|
33532
|
+
}, workspaceId, pathScope, app === null || app === void 0 ? void 0 : app.appId);
|
|
33500
33533
|
});
|
|
33501
33534
|
pendingConnects$1.set(stateKey, connectPromise);
|
|
33502
33535
|
_context.prev = 24;
|
|
@@ -43351,7 +43384,7 @@ var ProviderDetail = function ProviderDetail(_ref) {
|
|
|
43351
43384
|
});
|
|
43352
43385
|
};
|
|
43353
43386
|
|
|
43354
|
-
var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers"];
|
|
43387
|
+
var _excluded$1 = ["transport", "command", "args", "envMapping", "url", "headerTemplate", "headers", "auth", "oauth"];
|
|
43355
43388
|
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; }
|
|
43356
43389
|
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; }
|
|
43357
43390
|
var DirectoryListField = function DirectoryListField(_ref) {
|
|
@@ -43479,9 +43512,20 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43479
43512
|
args = _ref3.args,
|
|
43480
43513
|
envMappingRows = _ref3.envMappingRows,
|
|
43481
43514
|
url = _ref3.url,
|
|
43482
|
-
headerRows = _ref3.headerRows
|
|
43515
|
+
headerRows = _ref3.headerRows,
|
|
43516
|
+
_ref3$authType = _ref3.authType,
|
|
43517
|
+
authType = _ref3$authType === void 0 ? "apiKey" : _ref3$authType,
|
|
43518
|
+
_ref3$oauthScopes = _ref3.oauthScopes,
|
|
43519
|
+
oauthScopes = _ref3$oauthScopes === void 0 ? "" : _ref3$oauthScopes,
|
|
43520
|
+
_ref3$oauthClientId = _ref3.oauthClientId,
|
|
43521
|
+
oauthClientId = _ref3$oauthClientId === void 0 ? "" : _ref3$oauthClientId,
|
|
43522
|
+
_ref3$oauthClientSecr = _ref3.oauthClientSecret,
|
|
43523
|
+
oauthClientSecret = _ref3$oauthClientSecr === void 0 ? "" : _ref3$oauthClientSecr;
|
|
43483
43524
|
var baseConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
43484
43525
|
// Everything on baseConfig that the form doesn't own gets preserved.
|
|
43526
|
+
// `auth`/`oauth` are owned by the form's auth-type selector, so they're
|
|
43527
|
+
// excluded here and re-emitted below based on the current selection
|
|
43528
|
+
// (this is how toggling away from OAuth clears them).
|
|
43485
43529
|
baseConfig.transport;
|
|
43486
43530
|
baseConfig.command;
|
|
43487
43531
|
baseConfig.args;
|
|
@@ -43489,6 +43533,8 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43489
43533
|
baseConfig.url;
|
|
43490
43534
|
baseConfig.headerTemplate;
|
|
43491
43535
|
baseConfig.headers;
|
|
43536
|
+
baseConfig.auth;
|
|
43537
|
+
baseConfig.oauth;
|
|
43492
43538
|
var passThrough = _objectWithoutProperties(baseConfig, _excluded$1);
|
|
43493
43539
|
if (transport === "stdio") {
|
|
43494
43540
|
var envMapping = {};
|
|
@@ -43508,6 +43554,23 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43508
43554
|
}
|
|
43509
43555
|
|
|
43510
43556
|
// streamable_http
|
|
43557
|
+
var config = _objectSpread$v(_objectSpread$v({}, passThrough), {}, {
|
|
43558
|
+
transport: "streamable_http",
|
|
43559
|
+
url: url.trim()
|
|
43560
|
+
});
|
|
43561
|
+
if (authType === "oauth") {
|
|
43562
|
+
// Interactive OAuth 2.0 (SDK-native). Scopes optional; clientId/secret
|
|
43563
|
+
// only for servers without Dynamic Client Registration.
|
|
43564
|
+
config.auth = "oauth";
|
|
43565
|
+
var oauth = {};
|
|
43566
|
+
if (oauthScopes.trim()) oauth.scopes = oauthScopes.trim();
|
|
43567
|
+
if (oauthClientId.trim()) oauth.clientId = oauthClientId.trim();
|
|
43568
|
+
if (oauthClientSecret.trim()) oauth.clientSecret = oauthClientSecret.trim();
|
|
43569
|
+
config.oauth = oauth;
|
|
43570
|
+
return config;
|
|
43571
|
+
}
|
|
43572
|
+
|
|
43573
|
+
// apiKey (header template) — also the path for "none" (no headers added)
|
|
43511
43574
|
var headerTemplate = {};
|
|
43512
43575
|
headerRows.forEach(function (row) {
|
|
43513
43576
|
var name = row.headerName.trim();
|
|
@@ -43516,11 +43579,7 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43516
43579
|
headerTemplate[name] = value;
|
|
43517
43580
|
}
|
|
43518
43581
|
});
|
|
43519
|
-
|
|
43520
|
-
transport: "streamable_http",
|
|
43521
|
-
url: url.trim()
|
|
43522
|
-
});
|
|
43523
|
-
if (Object.keys(headerTemplate).length > 0) {
|
|
43582
|
+
if (authType === "apiKey" && Object.keys(headerTemplate).length > 0) {
|
|
43524
43583
|
config.headerTemplate = headerTemplate;
|
|
43525
43584
|
}
|
|
43526
43585
|
return config;
|
|
@@ -43549,7 +43608,7 @@ function buildMcpConfig(transport, _ref3) {
|
|
|
43549
43608
|
* preserved verbatim on save so editing never silently drops them.
|
|
43550
43609
|
*/
|
|
43551
43610
|
var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
43552
|
-
var _testResult$tools;
|
|
43611
|
+
var _initialMcpConfig$oau, _initialMcpConfig$oau2, _initialMcpConfig$oau3, _initialMcpConfig$oau4, _initialMcpConfig$oau5, _testResult$tools;
|
|
43553
43612
|
var onSave = _ref4.onSave,
|
|
43554
43613
|
onBack = _ref4.onBack,
|
|
43555
43614
|
_ref4$isEditMode = _ref4.isEditMode,
|
|
@@ -43635,41 +43694,67 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43635
43694
|
headerRows = _useState22[0],
|
|
43636
43695
|
setHeaderRows = _useState22[1];
|
|
43637
43696
|
|
|
43638
|
-
//
|
|
43639
|
-
var _useState23 = React.useState(
|
|
43697
|
+
// HTTP auth type: "none" | "apiKey" | "oauth"
|
|
43698
|
+
var _useState23 = React.useState(function () {
|
|
43699
|
+
var cfg = initialMcpConfig || {};
|
|
43700
|
+
if (cfg.auth === "oauth" || cfg.oauth) return "oauth";
|
|
43701
|
+
return "apiKey";
|
|
43702
|
+
}),
|
|
43640
43703
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
43641
|
-
|
|
43642
|
-
|
|
43643
|
-
|
|
43644
|
-
// Wizard step state
|
|
43645
|
-
var _useState25 = React.useState(0),
|
|
43704
|
+
authType = _useState24[0],
|
|
43705
|
+
setAuthType = _useState24[1];
|
|
43706
|
+
var _useState25 = React.useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau = initialMcpConfig.oauth) === null || _initialMcpConfig$oau === void 0 ? void 0 : _initialMcpConfig$oau.scopes) || ""),
|
|
43646
43707
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
43647
|
-
|
|
43648
|
-
|
|
43649
|
-
|
|
43650
|
-
// Auth state
|
|
43651
|
-
var _useState27 = React.useState(false),
|
|
43708
|
+
oauthScopes = _useState26[0],
|
|
43709
|
+
setOauthScopes = _useState26[1];
|
|
43710
|
+
var _useState27 = React.useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau2 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau2 === void 0 ? void 0 : _initialMcpConfig$oau2.clientId) || ""),
|
|
43652
43711
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
43653
|
-
|
|
43654
|
-
|
|
43655
|
-
var _useState29 = React.useState(null),
|
|
43712
|
+
oauthClientId = _useState28[0],
|
|
43713
|
+
setOauthClientId = _useState28[1];
|
|
43714
|
+
var _useState29 = React.useState((initialMcpConfig === null || initialMcpConfig === void 0 || (_initialMcpConfig$oau3 = initialMcpConfig.oauth) === null || _initialMcpConfig$oau3 === void 0 ? void 0 : _initialMcpConfig$oau3.clientSecret) || ""),
|
|
43656
43715
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
43657
|
-
|
|
43658
|
-
|
|
43659
|
-
|
|
43660
|
-
// JSON editor state
|
|
43661
|
-
var _useState31 = React.useState("form"),
|
|
43716
|
+
oauthClientSecret = _useState30[0],
|
|
43717
|
+
setOauthClientSecret = _useState30[1];
|
|
43718
|
+
var _useState31 = React.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)),
|
|
43662
43719
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
43663
|
-
|
|
43664
|
-
|
|
43665
|
-
|
|
43720
|
+
showOauthAdvanced = _useState32[0],
|
|
43721
|
+
setShowOauthAdvanced = _useState32[1];
|
|
43722
|
+
|
|
43723
|
+
// Tool selection state
|
|
43724
|
+
var _useState33 = React.useState(initialAllowedTools),
|
|
43666
43725
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
43667
|
-
|
|
43668
|
-
|
|
43669
|
-
|
|
43726
|
+
selectedTools = _useState34[0],
|
|
43727
|
+
setSelectedTools = _useState34[1];
|
|
43728
|
+
|
|
43729
|
+
// Wizard step state
|
|
43730
|
+
var _useState35 = React.useState(0),
|
|
43670
43731
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
43671
|
-
|
|
43672
|
-
|
|
43732
|
+
wizardStep = _useState36[0],
|
|
43733
|
+
setWizardStep = _useState36[1];
|
|
43734
|
+
|
|
43735
|
+
// Auth state
|
|
43736
|
+
var _useState37 = React.useState(false),
|
|
43737
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
43738
|
+
isAuthorizing = _useState38[0],
|
|
43739
|
+
setIsAuthorizing = _useState38[1];
|
|
43740
|
+
var _useState39 = React.useState(null),
|
|
43741
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
43742
|
+
authResult = _useState40[0],
|
|
43743
|
+
setAuthResult = _useState40[1];
|
|
43744
|
+
|
|
43745
|
+
// JSON editor state
|
|
43746
|
+
var _useState41 = React.useState("form"),
|
|
43747
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
43748
|
+
viewMode = _useState42[0],
|
|
43749
|
+
setViewMode = _useState42[1]; // "form" | "json"
|
|
43750
|
+
var _useState43 = React.useState(""),
|
|
43751
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
43752
|
+
jsonText = _useState44[0],
|
|
43753
|
+
setJsonText = _useState44[1];
|
|
43754
|
+
var _useState45 = React.useState(null),
|
|
43755
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
43756
|
+
jsonError = _useState46[0],
|
|
43757
|
+
setJsonError = _useState46[1];
|
|
43673
43758
|
|
|
43674
43759
|
// Clear credential data when transport changes (derived fields change entirely)
|
|
43675
43760
|
// Only in create mode — in edit mode the initial transport is set correctly
|
|
@@ -43681,8 +43766,11 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43681
43766
|
}
|
|
43682
43767
|
}, [transport, isEditMode]);
|
|
43683
43768
|
|
|
43684
|
-
// Dynamic wizard steps based on whether auth is needed
|
|
43685
|
-
|
|
43769
|
+
// Dynamic wizard steps based on whether auth is needed. Either a
|
|
43770
|
+
// catalog-provided subprocess authCommand (legacy) or an OAuth 2.0
|
|
43771
|
+
// custom server adds an "Authorize" step before Test & Tools.
|
|
43772
|
+
var isOAuth = transport === "streamable_http" && authType === "oauth";
|
|
43773
|
+
var hasAuth = !!initialAuthCommand || isOAuth;
|
|
43686
43774
|
var wizardSteps = hasAuth ? ["configure", "authorize", "testTools"] : ["configure", "testTools"];
|
|
43687
43775
|
var totalSteps = wizardSteps.length;
|
|
43688
43776
|
var currentStepType = wizardSteps[wizardStep];
|
|
@@ -43711,9 +43799,13 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43711
43799
|
args: args,
|
|
43712
43800
|
envMappingRows: envMappingRows,
|
|
43713
43801
|
url: url,
|
|
43714
|
-
headerRows: headerRows
|
|
43802
|
+
headerRows: headerRows,
|
|
43803
|
+
authType: authType,
|
|
43804
|
+
oauthScopes: oauthScopes,
|
|
43805
|
+
oauthClientId: oauthClientId,
|
|
43806
|
+
oauthClientSecret: oauthClientSecret
|
|
43715
43807
|
}, initialMcpConfig || {});
|
|
43716
|
-
}, [transport, command, args, envMappingRows, url, headerRows, initialMcpConfig]);
|
|
43808
|
+
}, [transport, command, args, envMappingRows, url, headerRows, authType, oauthScopes, oauthClientId, oauthClientSecret, initialMcpConfig]);
|
|
43717
43809
|
|
|
43718
43810
|
// Invalidate test result when config changes after a test
|
|
43719
43811
|
var mcpConfigRef = React.useRef(mcpConfig);
|
|
@@ -43911,10 +44003,10 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43911
44003
|
|
|
43912
44004
|
// --- authorize (OAuth browser flow) ---
|
|
43913
44005
|
var handleAuthorize = function handleAuthorize() {
|
|
43914
|
-
if (!dashApi
|
|
44006
|
+
if (!dashApi) return;
|
|
43915
44007
|
setIsAuthorizing(true);
|
|
43916
44008
|
setAuthResult(null);
|
|
43917
|
-
|
|
44009
|
+
var onComplete = function onComplete(event, result) {
|
|
43918
44010
|
if (result.error) {
|
|
43919
44011
|
setAuthResult({
|
|
43920
44012
|
success: false,
|
|
@@ -43927,13 +44019,22 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
43927
44019
|
});
|
|
43928
44020
|
}
|
|
43929
44021
|
setIsAuthorizing(false);
|
|
43930
|
-
}
|
|
44022
|
+
};
|
|
44023
|
+
var onFail = function onFail(event, err) {
|
|
43931
44024
|
setAuthResult({
|
|
43932
44025
|
success: false,
|
|
43933
44026
|
message: (err === null || err === void 0 ? void 0 : err.message) || "Authorization failed"
|
|
43934
44027
|
});
|
|
43935
44028
|
setIsAuthorizing(false);
|
|
43936
|
-
}
|
|
44029
|
+
};
|
|
44030
|
+
if (isOAuth) {
|
|
44031
|
+
// SDK-native OAuth 2.0: opens the system browser, persists tokens.
|
|
44032
|
+
dashApi.mcpAuthorize(providerName.trim() || "__test__custom", mcpConfig, credentialData, onComplete, onFail, appContext === null || appContext === void 0 ? void 0 : appContext.appId);
|
|
44033
|
+
return;
|
|
44034
|
+
}
|
|
44035
|
+
if (!initialAuthCommand) return;
|
|
44036
|
+
// Legacy catalog subprocess auth (e.g. bundled Google servers).
|
|
44037
|
+
dashApi.mcpRunAuth(mcpConfig, credentialData, initialAuthCommand, onComplete, onFail);
|
|
43937
44038
|
};
|
|
43938
44039
|
|
|
43939
44040
|
// --- save ---
|
|
@@ -44242,7 +44343,82 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
44242
44343
|
className: "text-sm text-red-400",
|
|
44243
44344
|
children: formErrors.url
|
|
44244
44345
|
})]
|
|
44245
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
44346
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44347
|
+
className: "flex flex-col gap-2",
|
|
44348
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.RadioGroup, {
|
|
44349
|
+
label: "Authentication",
|
|
44350
|
+
name: "mcp-http-auth-type",
|
|
44351
|
+
value: authType,
|
|
44352
|
+
onChange: function onChange(value) {
|
|
44353
|
+
setAuthType(value);
|
|
44354
|
+
setAuthResult(null);
|
|
44355
|
+
},
|
|
44356
|
+
options: [{
|
|
44357
|
+
value: "none",
|
|
44358
|
+
label: "None"
|
|
44359
|
+
}, {
|
|
44360
|
+
value: "apiKey",
|
|
44361
|
+
label: "API key (headers)"
|
|
44362
|
+
}, {
|
|
44363
|
+
value: "oauth",
|
|
44364
|
+
label: "OAuth 2.0 (browser sign-in)"
|
|
44365
|
+
}]
|
|
44366
|
+
})
|
|
44367
|
+
}), authType === "oauth" && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44368
|
+
className: "space-y-3",
|
|
44369
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44370
|
+
className: "flex flex-col gap-2",
|
|
44371
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
|
|
44372
|
+
label: "Scopes"
|
|
44373
|
+
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
44374
|
+
className: "text-sm opacity-50",
|
|
44375
|
+
children: "Space-separated OAuth scopes (optional \u2014 many servers grant defaults)."
|
|
44376
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
44377
|
+
value: oauthScopes,
|
|
44378
|
+
onChange: setOauthScopes,
|
|
44379
|
+
placeholder: "e.g., read write offline_access"
|
|
44380
|
+
})]
|
|
44381
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
44382
|
+
type: "button",
|
|
44383
|
+
onClick: function onClick() {
|
|
44384
|
+
return setShowOauthAdvanced(function (v) {
|
|
44385
|
+
return !v;
|
|
44386
|
+
});
|
|
44387
|
+
},
|
|
44388
|
+
className: "text-sm text-blue-400 hover:text-blue-300 transition-colors flex items-center gap-1 self-start",
|
|
44389
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
44390
|
+
icon: showOauthAdvanced ? "chevron-down" : "chevron-right",
|
|
44391
|
+
className: "text-xs"
|
|
44392
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
44393
|
+
children: "Advanced: pre-registered client"
|
|
44394
|
+
})]
|
|
44395
|
+
}), showOauthAdvanced && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44396
|
+
className: "space-y-3 pl-1",
|
|
44397
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("p", {
|
|
44398
|
+
className: "text-sm opacity-50",
|
|
44399
|
+
children: "Only needed for servers that don't support Dynamic Client Registration. Leave blank otherwise."
|
|
44400
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44401
|
+
className: "flex flex-col gap-2",
|
|
44402
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
|
|
44403
|
+
label: "Client ID"
|
|
44404
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
44405
|
+
value: oauthClientId,
|
|
44406
|
+
onChange: setOauthClientId,
|
|
44407
|
+
placeholder: "Client ID"
|
|
44408
|
+
})]
|
|
44409
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44410
|
+
className: "flex flex-col gap-2",
|
|
44411
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
|
|
44412
|
+
label: "Client secret"
|
|
44413
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
44414
|
+
type: "password",
|
|
44415
|
+
value: oauthClientSecret,
|
|
44416
|
+
onChange: setOauthClientSecret,
|
|
44417
|
+
placeholder: "Client secret (if required)"
|
|
44418
|
+
})]
|
|
44419
|
+
})]
|
|
44420
|
+
})]
|
|
44421
|
+
}), authType === "apiKey" && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44246
44422
|
className: "space-y-3",
|
|
44247
44423
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44248
44424
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FormLabel, {
|
|
@@ -44383,7 +44559,7 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
44383
44559
|
className: "flex flex-col items-center justify-center py-8 space-y-4",
|
|
44384
44560
|
children: [/*#__PURE__*/jsxRuntime.jsx("p", {
|
|
44385
44561
|
className: "text-sm opacity-60 text-center max-w-md",
|
|
44386
|
-
children: "This server requires OAuth authorization. Click the button below to open a browser window and complete the authentication flow."
|
|
44562
|
+
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."
|
|
44387
44563
|
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
44388
44564
|
title: isAuthorizing ? "Authorizing..." : "Authorize",
|
|
44389
44565
|
onClick: handleAuthorize,
|
|
@@ -44404,7 +44580,18 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref4) {
|
|
|
44404
44580
|
children: [/*#__PURE__*/jsxRuntime.jsx("p", {
|
|
44405
44581
|
className: "text-xs font-semibold opacity-40 uppercase tracking-wider",
|
|
44406
44582
|
children: "Troubleshooting"
|
|
44407
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("ul", {
|
|
44583
|
+
}), isOAuth ? /*#__PURE__*/jsxRuntime.jsxs("ul", {
|
|
44584
|
+
className: "text-sm opacity-60 space-y-1 list-disc list-inside",
|
|
44585
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("li", {
|
|
44586
|
+
children: "Make sure a browser window opened \u2014 check for a blocked pop-up or default-browser prompt"
|
|
44587
|
+
}), /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
44588
|
+
children: "Allow Dash to accept the local sign-in redirect if your firewall prompts"
|
|
44589
|
+
}), /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
44590
|
+
children: "Verify the server URL is correct and the scopes are valid for this server"
|
|
44591
|
+
}), /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
44592
|
+
children: "For servers without dynamic registration, set a Client ID under \"Advanced\""
|
|
44593
|
+
})]
|
|
44594
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs("ul", {
|
|
44408
44595
|
className: "text-sm opacity-60 space-y-1 list-disc list-inside",
|
|
44409
44596
|
children: [/*#__PURE__*/jsxRuntime.jsx("li", {
|
|
44410
44597
|
children: "Ensure Node.js and npx are available in your PATH"
|
|
@@ -52009,18 +52196,35 @@ var McpServerSection = function McpServerSection() {
|
|
|
52009
52196
|
});
|
|
52010
52197
|
};
|
|
52011
52198
|
|
|
52199
|
+
/**
|
|
52200
|
+
* modelMigration.js (renderer mirror)
|
|
52201
|
+
*
|
|
52202
|
+
* Mirrors the retired-model map + default from the main-process provider
|
|
52203
|
+
* registry (electron/llm/modelProviders.js) so the Settings UI can detect a
|
|
52204
|
+
* stale saved selection, auto-migrate it, and show a notice — without an IPC
|
|
52205
|
+
* round-trip. KEEP IN SYNC with modelProviders.js (anthropic provider).
|
|
52206
|
+
*/
|
|
52207
|
+
var DEFAULT_MODEL = "claude-opus-4-8";
|
|
52208
|
+
var RETIRED_MODEL_MAP = {
|
|
52209
|
+
"claude-sonnet-4-20250514": "claude-sonnet-4-6",
|
|
52210
|
+
"claude-opus-4-20250514": "claude-opus-4-8",
|
|
52211
|
+
"claude-opus-4-1-20250805": "claude-opus-4-8",
|
|
52212
|
+
"claude-3-7-sonnet-20250219": "claude-sonnet-4-6",
|
|
52213
|
+
"claude-3-5-sonnet-20241022": "claude-sonnet-4-6",
|
|
52214
|
+
"claude-3-5-sonnet-20240620": "claude-sonnet-4-6",
|
|
52215
|
+
"claude-3-5-haiku-20241022": "claude-haiku-4-5",
|
|
52216
|
+
"claude-3-opus-20240229": "claude-opus-4-8"
|
|
52217
|
+
};
|
|
52218
|
+
function isRetiredModel(id) {
|
|
52219
|
+
return !!RETIRED_MODEL_MAP[id];
|
|
52220
|
+
}
|
|
52221
|
+
function migrateModelId(id) {
|
|
52222
|
+
if (!id) return DEFAULT_MODEL;
|
|
52223
|
+
return RETIRED_MODEL_MAP[id] || id;
|
|
52224
|
+
}
|
|
52225
|
+
|
|
52012
52226
|
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; }
|
|
52013
52227
|
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; }
|
|
52014
|
-
var MODELS = [{
|
|
52015
|
-
value: "claude-sonnet-4-20250514",
|
|
52016
|
-
label: "Claude Sonnet 4"
|
|
52017
|
-
}, {
|
|
52018
|
-
value: "claude-opus-4-20250514",
|
|
52019
|
-
label: "Claude Opus 4"
|
|
52020
|
-
}, {
|
|
52021
|
-
value: "claude-haiku-4-5-20251001",
|
|
52022
|
-
label: "Claude Haiku 4.5"
|
|
52023
|
-
}];
|
|
52024
52228
|
var BACKENDS = [{
|
|
52025
52229
|
value: "claude-code",
|
|
52026
52230
|
label: "Claude Code CLI"
|
|
@@ -52029,6 +52233,7 @@ var BACKENDS = [{
|
|
|
52029
52233
|
label: "Anthropic API"
|
|
52030
52234
|
}];
|
|
52031
52235
|
var AiAssistantSection = function AiAssistantSection() {
|
|
52236
|
+
var _anthropicProvider$;
|
|
52032
52237
|
var appContext = React.useContext(AppContext);
|
|
52033
52238
|
var settings = (appContext === null || appContext === void 0 ? void 0 : appContext.settings) || {};
|
|
52034
52239
|
var providers = (appContext === null || appContext === void 0 ? void 0 : appContext.providers) || {};
|
|
@@ -52046,7 +52251,7 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52046
52251
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
52047
52252
|
preferredBackend = _useState4[0],
|
|
52048
52253
|
setPreferredBackend = _useState4[1];
|
|
52049
|
-
var _useState5 = React.useState(aiSettings.model ||
|
|
52254
|
+
var _useState5 = React.useState(aiSettings.model || DEFAULT_MODEL),
|
|
52050
52255
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
52051
52256
|
selectedModel = _useState6[0],
|
|
52052
52257
|
setSelectedModel = _useState6[1];
|
|
@@ -52063,6 +52268,21 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52063
52268
|
saveKeyStatus = _useState10[0],
|
|
52064
52269
|
setSaveKeyStatus = _useState10[1];
|
|
52065
52270
|
|
|
52271
|
+
// Provider-pluggable model discovery (live fetch + curated fallback)
|
|
52272
|
+
var _useState11 = React.useState([]),
|
|
52273
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
52274
|
+
availableModels = _useState12[0],
|
|
52275
|
+
setAvailableModels = _useState12[1];
|
|
52276
|
+
var _useState13 = React.useState(false),
|
|
52277
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
52278
|
+
modelsLoading = _useState14[0],
|
|
52279
|
+
setModelsLoading = _useState14[1];
|
|
52280
|
+
// One-time notice when a retired saved model was auto-migrated
|
|
52281
|
+
var _useState15 = React.useState(null),
|
|
52282
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
52283
|
+
migrationNotice = _useState16[0],
|
|
52284
|
+
setMigrationNotice = _useState16[1];
|
|
52285
|
+
|
|
52066
52286
|
// Find existing Anthropic provider
|
|
52067
52287
|
var anthropicProvider = Object.entries(providers).find(function (_ref) {
|
|
52068
52288
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
@@ -52071,6 +52291,9 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52071
52291
|
});
|
|
52072
52292
|
var hasAnthropicProvider = !!anthropicProvider;
|
|
52073
52293
|
var anthropicProviderName = anthropicProvider === null || anthropicProvider === void 0 ? void 0 : anthropicProvider[0];
|
|
52294
|
+
// Decrypted key (when AppContext exposes it) enables the live Models API
|
|
52295
|
+
// fetch; without it, listModels returns the curated fallback list.
|
|
52296
|
+
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;
|
|
52074
52297
|
|
|
52075
52298
|
// Check CLI availability on mount
|
|
52076
52299
|
React.useEffect(function () {
|
|
@@ -52092,6 +52315,28 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52092
52315
|
}
|
|
52093
52316
|
}, []);
|
|
52094
52317
|
|
|
52318
|
+
// Fetch selectable models for the current provider. With an API key the
|
|
52319
|
+
// main process does a live Anthropic Models API fetch; otherwise it returns
|
|
52320
|
+
// the curated fallback. Provider is "anthropic" for both current backends.
|
|
52321
|
+
var fetchModels = React.useCallback(function () {
|
|
52322
|
+
var _window$mainApi2;
|
|
52323
|
+
if (!((_window$mainApi2 = window.mainApi) !== null && _window$mainApi2 !== void 0 && (_window$mainApi2 = _window$mainApi2.llm) !== null && _window$mainApi2 !== void 0 && _window$mainApi2.listModels)) return;
|
|
52324
|
+
setModelsLoading(true);
|
|
52325
|
+
window.mainApi.llm.listModels("anthropic", anthropicApiKey).then(function (res) {
|
|
52326
|
+
return setAvailableModels(res && res.models || []);
|
|
52327
|
+
})["catch"](function () {
|
|
52328
|
+
return setAvailableModels([]);
|
|
52329
|
+
})["finally"](function () {
|
|
52330
|
+
return setModelsLoading(false);
|
|
52331
|
+
});
|
|
52332
|
+
}, [anthropicApiKey]);
|
|
52333
|
+
|
|
52334
|
+
// Load models on mount and whenever the available API key changes (so the
|
|
52335
|
+
// list upgrades from curated → live once a key is configured).
|
|
52336
|
+
React.useEffect(function () {
|
|
52337
|
+
fetchModels();
|
|
52338
|
+
}, [fetchModels]);
|
|
52339
|
+
|
|
52095
52340
|
// Save AI settings to app settings
|
|
52096
52341
|
var saveAiSettings = React.useCallback(function (updates) {
|
|
52097
52342
|
if (appContext !== null && appContext !== void 0 && appContext.changeSettings) {
|
|
@@ -52102,6 +52347,24 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52102
52347
|
}));
|
|
52103
52348
|
}
|
|
52104
52349
|
}, [appContext]);
|
|
52350
|
+
|
|
52351
|
+
// Auto-migrate a retired saved model to its current replacement (one-time,
|
|
52352
|
+
// on mount) so an old selection can't 404 the assistant. Shows a notice.
|
|
52353
|
+
React.useEffect(function () {
|
|
52354
|
+
var saved = aiSettings.model;
|
|
52355
|
+
if (saved && isRetiredModel(saved)) {
|
|
52356
|
+
var replacement = migrateModelId(saved);
|
|
52357
|
+
setSelectedModel(replacement);
|
|
52358
|
+
saveAiSettings({
|
|
52359
|
+
model: replacement
|
|
52360
|
+
});
|
|
52361
|
+
setMigrationNotice({
|
|
52362
|
+
from: saved,
|
|
52363
|
+
to: replacement
|
|
52364
|
+
});
|
|
52365
|
+
}
|
|
52366
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52367
|
+
}, []);
|
|
52105
52368
|
function handleBackendChange(e) {
|
|
52106
52369
|
var value = e.target.value;
|
|
52107
52370
|
setPreferredBackend(value);
|
|
@@ -52145,6 +52408,15 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52145
52408
|
});
|
|
52146
52409
|
}
|
|
52147
52410
|
|
|
52411
|
+
// Model dropdown options — keep the current selection selectable even if it
|
|
52412
|
+
// isn't in the fetched list (e.g. a pinned/custom id).
|
|
52413
|
+
var modelOptions = selectedModel && !availableModels.some(function (m) {
|
|
52414
|
+
return m.value === selectedModel;
|
|
52415
|
+
}) ? [{
|
|
52416
|
+
value: selectedModel,
|
|
52417
|
+
label: selectedModel
|
|
52418
|
+
}].concat(_toConsumableArray(availableModels)) : availableModels;
|
|
52419
|
+
|
|
52148
52420
|
// Determine effective backend (what will actually be used)
|
|
52149
52421
|
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;
|
|
52150
52422
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -52241,6 +52513,18 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52241
52513
|
}, b.value);
|
|
52242
52514
|
})
|
|
52243
52515
|
})]
|
|
52516
|
+
}), migrationNotice && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
52517
|
+
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",
|
|
52518
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
52519
|
+
icon: "exclamation-triangle",
|
|
52520
|
+
className: "h-3.5 w-3.5 mt-0.5"
|
|
52521
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
52522
|
+
children: ["Your previously selected model (", /*#__PURE__*/jsxRuntime.jsx("code", {
|
|
52523
|
+
children: migrationNotice.from
|
|
52524
|
+
}), ") is no longer available. Switched to ", /*#__PURE__*/jsxRuntime.jsx("code", {
|
|
52525
|
+
children: migrationNotice.to
|
|
52526
|
+
}), "."]
|
|
52527
|
+
})]
|
|
52244
52528
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
52245
52529
|
className: "flex flex-row items-center justify-between py-1",
|
|
52246
52530
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -52250,18 +52534,31 @@ var AiAssistantSection = function AiAssistantSection() {
|
|
|
52250
52534
|
children: "Model"
|
|
52251
52535
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
52252
52536
|
className: "text-xs opacity-50",
|
|
52253
|
-
children: "
|
|
52537
|
+
children: "Model for AI Assistant conversations"
|
|
52538
|
+
})]
|
|
52539
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
52540
|
+
className: "flex items-center gap-2",
|
|
52541
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("select", {
|
|
52542
|
+
value: selectedModel,
|
|
52543
|
+
onChange: handleModelChange,
|
|
52544
|
+
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",
|
|
52545
|
+
children: modelOptions.map(function (m) {
|
|
52546
|
+
return /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
52547
|
+
value: m.value,
|
|
52548
|
+
children: m.label
|
|
52549
|
+
}, m.value);
|
|
52550
|
+
})
|
|
52551
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
52552
|
+
type: "button",
|
|
52553
|
+
onClick: fetchModels,
|
|
52554
|
+
disabled: modelsLoading,
|
|
52555
|
+
title: "Refresh available models",
|
|
52556
|
+
className: "text-gray-400 hover:text-gray-200 disabled:opacity-40 transition-colors p-1.5",
|
|
52557
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
52558
|
+
icon: "rotate",
|
|
52559
|
+
className: "h-3.5 w-3.5 ".concat(modelsLoading ? "animate-spin" : "")
|
|
52560
|
+
})
|
|
52254
52561
|
})]
|
|
52255
|
-
}), /*#__PURE__*/jsxRuntime.jsx("select", {
|
|
52256
|
-
value: selectedModel,
|
|
52257
|
-
onChange: handleModelChange,
|
|
52258
|
-
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",
|
|
52259
|
-
children: MODELS.map(function (m) {
|
|
52260
|
-
return /*#__PURE__*/jsxRuntime.jsx("option", {
|
|
52261
|
-
value: m.value,
|
|
52262
|
-
children: m.label
|
|
52263
|
-
}, m.value);
|
|
52264
|
-
})
|
|
52265
52562
|
})]
|
|
52266
52563
|
})]
|
|
52267
52564
|
}), !hasAnthropicProvider && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -68452,6 +68749,8 @@ exports.LayoutGridContainer = LayoutGridContainer;
|
|
|
68452
68749
|
exports.LayoutManagerModal = LayoutManagerModal;
|
|
68453
68750
|
exports.LayoutModel = LayoutModel;
|
|
68454
68751
|
exports.LayoutQuickAddMenu = LayoutQuickAddMenu;
|
|
68752
|
+
exports.MCP_AUTHORIZE_COMPLETE = MCP_AUTHORIZE_COMPLETE;
|
|
68753
|
+
exports.MCP_AUTHORIZE_ERROR = MCP_AUTHORIZE_ERROR;
|
|
68455
68754
|
exports.MCP_CALL_TOOL_COMPLETE = MCP_CALL_TOOL_COMPLETE;
|
|
68456
68755
|
exports.MCP_CALL_TOOL_ERROR = MCP_CALL_TOOL_ERROR;
|
|
68457
68756
|
exports.MCP_GET_CATALOG_COMPLETE = MCP_GET_CATALOG_COMPLETE;
|