@trops/dash-core 0.1.450 → 0.1.451
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 +113 -0
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +150 -68
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +109 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49239,6 +49239,15 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49239
49239
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
49240
49240
|
packageInfo = _useState14[0],
|
|
49241
49241
|
setPackageInfo = _useState14[1];
|
|
49242
|
+
// When the main-process pre-publish scan finds personal filesystem
|
|
49243
|
+
// paths in the package source, it returns `{ needsConfirmation: true,
|
|
49244
|
+
// personalPathFindings: [...] }` instead of publishing. We stash the
|
|
49245
|
+
// findings and surface a confirm-or-cancel panel; "Publish anyway"
|
|
49246
|
+
// retries with `confirmPersonalPaths: true`.
|
|
49247
|
+
var _useState15 = React.useState(null),
|
|
49248
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
49249
|
+
personalPathFindings = _useState16[0],
|
|
49250
|
+
setPersonalPathFindings = _useState16[1];
|
|
49242
49251
|
|
|
49243
49252
|
// Reset modal state on open
|
|
49244
49253
|
React.useEffect(function () {
|
|
@@ -49249,6 +49258,7 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49249
49258
|
setIsPublishing(false);
|
|
49250
49259
|
setResult(null);
|
|
49251
49260
|
setPackageInfo(null);
|
|
49261
|
+
setPersonalPathFindings(null);
|
|
49252
49262
|
}, [isOpen]);
|
|
49253
49263
|
|
|
49254
49264
|
// Inspect the package to get its metadata + component list
|
|
@@ -49416,10 +49426,18 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49416
49426
|
}
|
|
49417
49427
|
function _handlePublish() {
|
|
49418
49428
|
_handlePublish = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
49419
|
-
var
|
|
49429
|
+
var _ref4,
|
|
49430
|
+
_ref4$confirmPersonal,
|
|
49431
|
+
confirmPersonalPaths,
|
|
49432
|
+
options,
|
|
49433
|
+
packageId,
|
|
49434
|
+
res,
|
|
49435
|
+
_args4 = arguments,
|
|
49436
|
+
_t3;
|
|
49420
49437
|
return _regeneratorRuntime.wrap(function (_context4) {
|
|
49421
49438
|
while (1) switch (_context4.prev = _context4.next) {
|
|
49422
49439
|
case 0:
|
|
49440
|
+
_ref4 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref4$confirmPersonal = _ref4.confirmPersonalPaths, confirmPersonalPaths = _ref4$confirmPersonal === void 0 ? false : _ref4$confirmPersonal;
|
|
49423
49441
|
if (widget) {
|
|
49424
49442
|
_context4.next = 1;
|
|
49425
49443
|
break;
|
|
@@ -49428,18 +49446,28 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49428
49446
|
case 1:
|
|
49429
49447
|
setIsPublishing(true);
|
|
49430
49448
|
setResult(null);
|
|
49449
|
+
if (!confirmPersonalPaths) setPersonalPathFindings(null);
|
|
49431
49450
|
_context4.prev = 2;
|
|
49432
|
-
options = _objectSpread$k({
|
|
49451
|
+
options = _objectSpread$k(_objectSpread$k({
|
|
49433
49452
|
visibility: visibility
|
|
49434
49453
|
}, bump && bump !== "none" ? {
|
|
49435
49454
|
bump: bump
|
|
49455
|
+
} : {}), confirmPersonalPaths ? {
|
|
49456
|
+
confirmPersonalPaths: true
|
|
49436
49457
|
} : {});
|
|
49437
49458
|
packageId = widget.packageId || widget.name;
|
|
49438
49459
|
_context4.next = 3;
|
|
49439
49460
|
return window.mainApi.registry.publishWidget(appId, packageId, options);
|
|
49440
49461
|
case 3:
|
|
49441
49462
|
res = _context4.sent;
|
|
49442
|
-
|
|
49463
|
+
// Main process asked us to confirm a privacy warning before it ships
|
|
49464
|
+
// the package. Stash the findings and render the confirm panel —
|
|
49465
|
+
// don't mark as a completed result.
|
|
49466
|
+
if (res !== null && res !== void 0 && res.needsConfirmation && (res === null || res === void 0 ? void 0 : res.reason) === "personal-paths") {
|
|
49467
|
+
setPersonalPathFindings(res.personalPathFindings || []);
|
|
49468
|
+
} else {
|
|
49469
|
+
setResult(res);
|
|
49470
|
+
}
|
|
49443
49471
|
_context4.next = 5;
|
|
49444
49472
|
break;
|
|
49445
49473
|
case 4:
|
|
@@ -49461,6 +49489,14 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49461
49489
|
}));
|
|
49462
49490
|
return _handlePublish.apply(this, arguments);
|
|
49463
49491
|
}
|
|
49492
|
+
function handleCancelPersonalPathsConfirm() {
|
|
49493
|
+
setPersonalPathFindings(null);
|
|
49494
|
+
}
|
|
49495
|
+
function handleConfirmPersonalPathsAndPublish() {
|
|
49496
|
+
handlePublish({
|
|
49497
|
+
confirmPersonalPaths: true
|
|
49498
|
+
});
|
|
49499
|
+
}
|
|
49464
49500
|
if (!widget) return null;
|
|
49465
49501
|
var currentVersion = widget.version || "1.0.0";
|
|
49466
49502
|
var newVersion = bumpPreview(currentVersion, bump);
|
|
@@ -49505,7 +49541,48 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49505
49541
|
className: "text-xs text-red-300",
|
|
49506
49542
|
children: authError
|
|
49507
49543
|
})]
|
|
49508
|
-
}), authStatus === "authenticated" && !result && /*#__PURE__*/jsxRuntime.jsxs(
|
|
49544
|
+
}), authStatus === "authenticated" && personalPathFindings && !result && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49545
|
+
className: "space-y-3",
|
|
49546
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49547
|
+
className: "p-3 bg-amber-900/20 border border-amber-700/40 rounded text-sm text-amber-200",
|
|
49548
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49549
|
+
className: "font-semibold flex items-center gap-2 mb-1",
|
|
49550
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
49551
|
+
icon: "triangle-exclamation",
|
|
49552
|
+
className: "h-4 w-4"
|
|
49553
|
+
}), "Personal paths detected in this package"]
|
|
49554
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49555
|
+
className: "text-xs opacity-90",
|
|
49556
|
+
children: ["The following lines look like absolute paths on your machine. Publishing will include them. If any of these are your local filesystem, replace them with a tilde (e.g.", /*#__PURE__*/jsxRuntime.jsx("code", {
|
|
49557
|
+
className: "px-1 opacity-90",
|
|
49558
|
+
children: "~/pipeline"
|
|
49559
|
+
}), ") or a schema ", /*#__PURE__*/jsxRuntime.jsx("code", {
|
|
49560
|
+
className: "px-1 opacity-90",
|
|
49561
|
+
children: "defaultValue"
|
|
49562
|
+
}), " ", "before publishing."]
|
|
49563
|
+
})]
|
|
49564
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49565
|
+
className: "bg-white/5 border border-white/10 rounded-lg divide-y divide-white/10 max-h-60 overflow-y-auto",
|
|
49566
|
+
children: personalPathFindings.map(function (f, idx) {
|
|
49567
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49568
|
+
className: "px-3 py-2 text-xs",
|
|
49569
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49570
|
+
className: "font-mono text-amber-200 truncate",
|
|
49571
|
+
children: [f.file, ":", f.line]
|
|
49572
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49573
|
+
className: "font-mono opacity-80 mt-0.5 break-all",
|
|
49574
|
+
children: f.match
|
|
49575
|
+
}), f.context && f.context !== f.match && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49576
|
+
className: "font-mono opacity-50 mt-0.5 truncate",
|
|
49577
|
+
children: f.context
|
|
49578
|
+
})]
|
|
49579
|
+
}, "".concat(f.file, ":").concat(f.line, ":").concat(idx));
|
|
49580
|
+
})
|
|
49581
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49582
|
+
className: "text-xs opacity-60",
|
|
49583
|
+
children: ["Total findings: ", personalPathFindings.length, personalPathFindings.length >= 50 && " (capped)"]
|
|
49584
|
+
})]
|
|
49585
|
+
}), authStatus === "authenticated" && !result && !personalPathFindings && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
49509
49586
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49510
49587
|
className: "bg-white/5 border border-white/10 rounded-lg p-3 text-sm",
|
|
49511
49588
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -49666,16 +49743,29 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
|
|
|
49666
49743
|
})
|
|
49667
49744
|
})]
|
|
49668
49745
|
})]
|
|
49669
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
49746
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49670
49747
|
className: "flex-shrink-0 flex flex-row justify-end gap-2 p-4 border-t border-white/10",
|
|
49671
|
-
children:
|
|
49672
|
-
|
|
49673
|
-
|
|
49674
|
-
|
|
49675
|
-
|
|
49676
|
-
|
|
49677
|
-
|
|
49678
|
-
|
|
49748
|
+
children: personalPathFindings ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
49749
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Button3, {
|
|
49750
|
+
title: "Go back",
|
|
49751
|
+
onClick: handleCancelPersonalPathsConfirm
|
|
49752
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Button2, {
|
|
49753
|
+
title: isPublishing ? "Publishing…" : "Publish anyway",
|
|
49754
|
+
onClick: handleConfirmPersonalPathsAndPublish,
|
|
49755
|
+
disabled: isPublishing
|
|
49756
|
+
})]
|
|
49757
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
49758
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Button3, {
|
|
49759
|
+
title: result !== null && result !== void 0 && result.success ? "Close" : "Cancel",
|
|
49760
|
+
onClick: handleClose
|
|
49761
|
+
}), !(result !== null && result !== void 0 && result.success) && /*#__PURE__*/jsxRuntime.jsx(DashReact.Button2, {
|
|
49762
|
+
title: isPublishing ? "Publishing…" : "Publish",
|
|
49763
|
+
onClick: function onClick() {
|
|
49764
|
+
return handlePublish();
|
|
49765
|
+
},
|
|
49766
|
+
disabled: !canPublish
|
|
49767
|
+
})]
|
|
49768
|
+
})
|
|
49679
49769
|
})]
|
|
49680
49770
|
})
|
|
49681
49771
|
});
|
|
@@ -62630,15 +62720,6 @@ function ChatCore(_ref) {
|
|
|
62630
62720
|
}
|
|
62631
62721
|
};
|
|
62632
62722
|
|
|
62633
|
-
// End CLI session
|
|
62634
|
-
var handleEndSession = function handleEndSession() {
|
|
62635
|
-
var _mainApi$llm4;
|
|
62636
|
-
if (!isCliBackend || !(mainApi !== null && mainApi !== void 0 && (_mainApi$llm4 = mainApi.llm) !== null && _mainApi$llm4 !== void 0 && _mainApi$llm4.endCliSession)) return;
|
|
62637
|
-
if (isLoading) handleStop();
|
|
62638
|
-
mainApi.llm.endCliSession(uuid || persistKey || sessionKey);
|
|
62639
|
-
setSessionActive(false);
|
|
62640
|
-
};
|
|
62641
|
-
|
|
62642
62723
|
// Toggle tool
|
|
62643
62724
|
var handleToggleTool = function handleToggleTool(toolName) {
|
|
62644
62725
|
setEnabledTools(function (prev) {
|
|
@@ -62663,29 +62744,21 @@ function ChatCore(_ref) {
|
|
|
62663
62744
|
className: "inline-block w-2 h-2 rounded-full bg-green-400",
|
|
62664
62745
|
title: "CLI session active"
|
|
62665
62746
|
})]
|
|
62666
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
62747
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
62667
62748
|
className: "flex items-center gap-1",
|
|
62668
|
-
children:
|
|
62669
|
-
onClick: handleEndSession,
|
|
62670
|
-
className: "px-2 py-1 text-xs rounded bg-red-900/50 hover:bg-red-800/50 text-red-300 transition-colors",
|
|
62671
|
-
children: "End Session"
|
|
62672
|
-
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
62749
|
+
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
62673
62750
|
onClick: handleNewChat,
|
|
62674
62751
|
className: "px-2 py-1 text-xs rounded bg-gray-700 hover:bg-gray-600 text-gray-300 transition-colors",
|
|
62675
62752
|
children: "New Chat"
|
|
62676
|
-
})
|
|
62753
|
+
})
|
|
62677
62754
|
})]
|
|
62678
|
-
}) : /*#__PURE__*/jsxRuntime.
|
|
62755
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
62679
62756
|
className: "flex items-center justify-end px-3 py-1 shrink-0",
|
|
62680
|
-
children:
|
|
62681
|
-
onClick: handleEndSession,
|
|
62682
|
-
className: "px-2 py-1 text-xs rounded bg-red-900/50 hover:bg-red-800/50 text-red-300 transition-colors mr-1",
|
|
62683
|
-
children: "End Session"
|
|
62684
|
-
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
62757
|
+
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
62685
62758
|
onClick: handleNewChat,
|
|
62686
62759
|
className: "px-2 py-1 text-xs rounded bg-gray-700 hover:bg-gray-600 text-gray-300 transition-colors",
|
|
62687
62760
|
children: "New Chat"
|
|
62688
|
-
})
|
|
62761
|
+
})
|
|
62689
62762
|
}), error && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
62690
62763
|
className: "mx-3 mt-2 p-2 bg-red-900/30 border border-red-700 rounded text-red-300 text-xs",
|
|
62691
62764
|
children: [error, /*#__PURE__*/jsxRuntime.jsx("button", {
|