@trops/dash-core 0.1.513 → 0.1.515
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 +177 -54
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +13 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -29386,6 +29386,17 @@ var pendingConnects$1 = new Map();
|
|
|
29386
29386
|
// Map<`${workspaceId}::${serverName}`, Promise<result>>
|
|
29387
29387
|
|
|
29388
29388
|
var NO_WORKSPACE = "__no_workspace__";
|
|
29389
|
+
|
|
29390
|
+
/**
|
|
29391
|
+
* Renderer-side timeout for `callTool`. MUST exceed
|
|
29392
|
+
* `electron/mcp/jitConsent.js`'s `DEFAULT_TIMEOUT_MS` (60_000) so that
|
|
29393
|
+
* an in-flight JIT consent prompt can resolve before this Promise
|
|
29394
|
+
* rejects. Pre-fix value (30_000) caused the renderer to error out
|
|
29395
|
+
* mid-prompt — even on user approval the widget had already failed.
|
|
29396
|
+
* 90_000 = 60s main JIT timeout + 30s slack for IPC roundtrip,
|
|
29397
|
+
* grant write, and gate re-evaluation.
|
|
29398
|
+
*/
|
|
29399
|
+
var CALL_TOOL_TIMEOUT_MS = 90000;
|
|
29389
29400
|
function rendererStateKey(workspaceId, serverName) {
|
|
29390
29401
|
var wid = workspaceId && typeof workspaceId === "string" ? workspaceId : NO_WORKSPACE;
|
|
29391
29402
|
return wid + "::" + serverName;
|
|
@@ -29985,8 +29996,8 @@ var useMcpProvider = function useMcpProvider(providerType) {
|
|
|
29985
29996
|
widgetIdForGate = (widgetData === null || widgetData === void 0 ? void 0 : widgetData.name) || null;
|
|
29986
29997
|
return _context3.abrupt("return", new Promise(function (resolve, reject) {
|
|
29987
29998
|
var timeout = setTimeout(function () {
|
|
29988
|
-
reject(new Error("Tool call \"".concat(toolName, "\" timed out after
|
|
29989
|
-
},
|
|
29999
|
+
reject(new Error("Tool call \"".concat(toolName, "\" timed out after ").concat(CALL_TOOL_TIMEOUT_MS, "ms")));
|
|
30000
|
+
}, CALL_TOOL_TIMEOUT_MS);
|
|
29990
30001
|
dashApi.mcpCallTool(selectedProviderName, toolName, args, effectiveAllowedTools, function (event, result) {
|
|
29991
30002
|
clearTimeout(timeout);
|
|
29992
30003
|
if (result.error) {
|