@trops/dash-core 0.1.58 → 0.1.59
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/index.esm.js +15 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26604,6 +26604,10 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26604
26604
|
isEditMode = _ref2$isEditMode === void 0 ? false : _ref2$isEditMode,
|
|
26605
26605
|
_ref2$initialName = _ref2.initialName,
|
|
26606
26606
|
initialName = _ref2$initialName === void 0 ? "" : _ref2$initialName,
|
|
26607
|
+
_ref2$initialProvider = _ref2.initialProviderType,
|
|
26608
|
+
initialProviderType = _ref2$initialProvider === void 0 ? "custom" : _ref2$initialProvider,
|
|
26609
|
+
_ref2$initialCredenti = _ref2.initialCredentialSchema,
|
|
26610
|
+
initialCredentialSchema = _ref2$initialCredenti === void 0 ? {} : _ref2$initialCredenti,
|
|
26607
26611
|
_ref2$initialTranspor = _ref2.initialTransport,
|
|
26608
26612
|
initialTransport = _ref2$initialTranspor === void 0 ? "stdio" : _ref2$initialTranspor,
|
|
26609
26613
|
_ref2$initialCommand = _ref2.initialCommand,
|
|
@@ -26616,8 +26620,8 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26616
26620
|
initialUrl = _ref2$initialUrl === void 0 ? "" : _ref2$initialUrl,
|
|
26617
26621
|
_ref2$initialHeaderRo = _ref2.initialHeaderRows,
|
|
26618
26622
|
initialHeaderRows = _ref2$initialHeaderRo === void 0 ? [] : _ref2$initialHeaderRo,
|
|
26619
|
-
_ref2$
|
|
26620
|
-
initialCredentials = _ref2$
|
|
26623
|
+
_ref2$initialCredenti2 = _ref2.initialCredentials,
|
|
26624
|
+
initialCredentials = _ref2$initialCredenti2 === void 0 ? {} : _ref2$initialCredenti2;
|
|
26621
26625
|
var appContext = React.useContext(AppContext);
|
|
26622
26626
|
var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
|
|
26623
26627
|
|
|
@@ -26709,8 +26713,8 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26709
26713
|
|
|
26710
26714
|
// Derive credential fields from the live mcpConfig
|
|
26711
26715
|
var formFields = React.useMemo(function () {
|
|
26712
|
-
return deriveFormFields(mcpConfig,
|
|
26713
|
-
}, [mcpConfig]);
|
|
26716
|
+
return deriveFormFields(mcpConfig, initialCredentialSchema);
|
|
26717
|
+
}, [mcpConfig, initialCredentialSchema]);
|
|
26714
26718
|
|
|
26715
26719
|
// --- envMapping row handlers ---
|
|
26716
26720
|
var addEnvRow = function addEnvRow() {
|
|
@@ -26886,11 +26890,11 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
|
|
|
26886
26890
|
url: result.url,
|
|
26887
26891
|
headerRows: result.headerRows
|
|
26888
26892
|
});
|
|
26889
|
-
onSave(name,
|
|
26893
|
+
onSave(name, initialProviderType, result.credentialData, config);
|
|
26890
26894
|
return;
|
|
26891
26895
|
}
|
|
26892
26896
|
if (!validateForm()) return;
|
|
26893
|
-
onSave(providerName.trim(),
|
|
26897
|
+
onSave(providerName.trim(), initialProviderType, credentialData, mcpConfig);
|
|
26894
26898
|
};
|
|
26895
26899
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
26896
26900
|
className: "flex flex-col flex-1 min-h-0",
|
|
@@ -28181,9 +28185,14 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
28181
28185
|
});
|
|
28182
28186
|
} else if (isEditingMcp && selectedName && selectedProvider) {
|
|
28183
28187
|
var mc = selectedProvider.mcpConfig || {};
|
|
28188
|
+
var editCatalogEntry = catalog.find(function (entry) {
|
|
28189
|
+
return entry.id === selectedProvider.type;
|
|
28190
|
+
});
|
|
28184
28191
|
detailContent = /*#__PURE__*/jsxRuntime.jsx(CustomMcpServerForm, {
|
|
28185
28192
|
isEditMode: true,
|
|
28186
28193
|
initialName: selectedName,
|
|
28194
|
+
initialProviderType: selectedProvider.type || "custom",
|
|
28195
|
+
initialCredentialSchema: (editCatalogEntry === null || editCatalogEntry === void 0 ? void 0 : editCatalogEntry.credentialSchema) || {},
|
|
28187
28196
|
initialTransport: mc.transport || "stdio",
|
|
28188
28197
|
initialCommand: mc.command || "",
|
|
28189
28198
|
initialArgs: (mc.args || []).join(" "),
|