@trops/dash-core 0.1.72 → 0.1.74
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 +23 -1
- package/dist/electron/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -4442,7 +4442,7 @@ function requireProviderController () {
|
|
|
4442
4442
|
hasRequiredProviderController = 1;
|
|
4443
4443
|
const { app, safeStorage } = require$$0;
|
|
4444
4444
|
const path = require$$1$1;
|
|
4445
|
-
const { writeFileSync } = require$$2;
|
|
4445
|
+
const { writeFileSync, readFileSync, existsSync } = require$$2;
|
|
4446
4446
|
const {
|
|
4447
4447
|
ensureDirectoryExistence,
|
|
4448
4448
|
getFileContents,
|
|
@@ -4565,6 +4565,18 @@ function requireProviderController () {
|
|
|
4565
4565
|
// Load providers file
|
|
4566
4566
|
const providersData = getFileContents(filename, {});
|
|
4567
4567
|
|
|
4568
|
+
// Load MCP catalog for merging new config fields into saved providers
|
|
4569
|
+
let catalog = [];
|
|
4570
|
+
try {
|
|
4571
|
+
const catalogPath = path.join(__dirname, "..", "mcp", "mcpServerCatalog.json");
|
|
4572
|
+
if (existsSync(catalogPath)) {
|
|
4573
|
+
const catalogData = JSON.parse(readFileSync(catalogPath, "utf-8"));
|
|
4574
|
+
catalog = catalogData.servers || [];
|
|
4575
|
+
}
|
|
4576
|
+
} catch (e) {
|
|
4577
|
+
// Catalog is optional — merge is best-effort
|
|
4578
|
+
}
|
|
4579
|
+
|
|
4568
4580
|
// Decrypt all credentials
|
|
4569
4581
|
const decryptedProviders = [];
|
|
4570
4582
|
Object.entries(providersData).forEach(([name, data]) => {
|
|
@@ -4585,6 +4597,16 @@ function requireProviderController () {
|
|
|
4585
4597
|
// Include mcpConfig for MCP providers
|
|
4586
4598
|
if (data.mcpConfig) {
|
|
4587
4599
|
provider.mcpConfig = data.mcpConfig;
|
|
4600
|
+
|
|
4601
|
+
// Merge argsMapping from catalog if missing from saved config
|
|
4602
|
+
// (providers snapshot mcpConfig at creation time; this ensures
|
|
4603
|
+
// existing providers pick up new catalog features like argsMapping)
|
|
4604
|
+
if (!data.mcpConfig.argsMapping && data.type) {
|
|
4605
|
+
const catalogEntry = catalog.find((entry) => entry.id === data.type);
|
|
4606
|
+
if (catalogEntry?.mcpConfig?.argsMapping) {
|
|
4607
|
+
provider.mcpConfig.argsMapping = catalogEntry.mcpConfig.argsMapping;
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4588
4610
|
}
|
|
4589
4611
|
|
|
4590
4612
|
// Include allowedTools for MCP providers
|