@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 CHANGED
@@ -26585,6 +26585,10 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
26585
26585
  isEditMode = _ref2$isEditMode === void 0 ? false : _ref2$isEditMode,
26586
26586
  _ref2$initialName = _ref2.initialName,
26587
26587
  initialName = _ref2$initialName === void 0 ? "" : _ref2$initialName,
26588
+ _ref2$initialProvider = _ref2.initialProviderType,
26589
+ initialProviderType = _ref2$initialProvider === void 0 ? "custom" : _ref2$initialProvider,
26590
+ _ref2$initialCredenti = _ref2.initialCredentialSchema,
26591
+ initialCredentialSchema = _ref2$initialCredenti === void 0 ? {} : _ref2$initialCredenti,
26588
26592
  _ref2$initialTranspor = _ref2.initialTransport,
26589
26593
  initialTransport = _ref2$initialTranspor === void 0 ? "stdio" : _ref2$initialTranspor,
26590
26594
  _ref2$initialCommand = _ref2.initialCommand,
@@ -26597,8 +26601,8 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
26597
26601
  initialUrl = _ref2$initialUrl === void 0 ? "" : _ref2$initialUrl,
26598
26602
  _ref2$initialHeaderRo = _ref2.initialHeaderRows,
26599
26603
  initialHeaderRows = _ref2$initialHeaderRo === void 0 ? [] : _ref2$initialHeaderRo,
26600
- _ref2$initialCredenti = _ref2.initialCredentials,
26601
- initialCredentials = _ref2$initialCredenti === void 0 ? {} : _ref2$initialCredenti;
26604
+ _ref2$initialCredenti2 = _ref2.initialCredentials,
26605
+ initialCredentials = _ref2$initialCredenti2 === void 0 ? {} : _ref2$initialCredenti2;
26602
26606
  var appContext = useContext(AppContext);
26603
26607
  var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
26604
26608
 
@@ -26690,8 +26694,8 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
26690
26694
 
26691
26695
  // Derive credential fields from the live mcpConfig
26692
26696
  var formFields = useMemo(function () {
26693
- return deriveFormFields(mcpConfig, {});
26694
- }, [mcpConfig]);
26697
+ return deriveFormFields(mcpConfig, initialCredentialSchema);
26698
+ }, [mcpConfig, initialCredentialSchema]);
26695
26699
 
26696
26700
  // --- envMapping row handlers ---
26697
26701
  var addEnvRow = function addEnvRow() {
@@ -26867,11 +26871,11 @@ var CustomMcpServerForm = function CustomMcpServerForm(_ref2) {
26867
26871
  url: result.url,
26868
26872
  headerRows: result.headerRows
26869
26873
  });
26870
- onSave(name, "custom", result.credentialData, config);
26874
+ onSave(name, initialProviderType, result.credentialData, config);
26871
26875
  return;
26872
26876
  }
26873
26877
  if (!validateForm()) return;
26874
- onSave(providerName.trim(), "custom", credentialData, mcpConfig);
26878
+ onSave(providerName.trim(), initialProviderType, credentialData, mcpConfig);
26875
26879
  };
26876
26880
  return /*#__PURE__*/jsxs("div", {
26877
26881
  className: "flex flex-col flex-1 min-h-0",
@@ -28162,9 +28166,14 @@ var ProvidersSection = function ProvidersSection(_ref) {
28162
28166
  });
28163
28167
  } else if (isEditingMcp && selectedName && selectedProvider) {
28164
28168
  var mc = selectedProvider.mcpConfig || {};
28169
+ var editCatalogEntry = catalog.find(function (entry) {
28170
+ return entry.id === selectedProvider.type;
28171
+ });
28165
28172
  detailContent = /*#__PURE__*/jsx(CustomMcpServerForm, {
28166
28173
  isEditMode: true,
28167
28174
  initialName: selectedName,
28175
+ initialProviderType: selectedProvider.type || "custom",
28176
+ initialCredentialSchema: (editCatalogEntry === null || editCatalogEntry === void 0 ? void 0 : editCatalogEntry.credentialSchema) || {},
28168
28177
  initialTransport: mc.transport || "stdio",
28169
28178
  initialCommand: mc.command || "",
28170
28179
  initialArgs: (mc.args || []).join(" "),