@trops/dash-core 0.1.450 → 0.1.452

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
@@ -45802,7 +45802,9 @@ var getIconForServer = function getIconForServer(server) {
45802
45802
  */
45803
45803
  var McpCatalogDetail = function McpCatalogDetail(_ref) {
45804
45804
  var onSave = _ref.onSave,
45805
- onCancel = _ref.onCancel;
45805
+ onCancel = _ref.onCancel,
45806
+ _ref$initialSelectedI = _ref.initialSelectedId,
45807
+ initialSelectedId = _ref$initialSelectedI === void 0 ? null : _ref$initialSelectedI;
45806
45808
  var appContext = useContext(AppContext);
45807
45809
  var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
45808
45810
  var _useState = useState([]),
@@ -45939,6 +45941,22 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
45939
45941
  // eslint-disable-next-line react-hooks/exhaustive-deps
45940
45942
  }, [dashApi]);
45941
45943
 
45944
+ // Pre-select a catalog entry when initialSelectedId is provided
45945
+ // (used by the cross-modal "Add new <type>" CTA from the Widget
45946
+ // Builder). Fires once the catalog finishes loading; if no entry
45947
+ // matches the id (e.g. type isn't in the catalog), silently no-ops
45948
+ // and the user lands on the catalog grid to pick manually.
45949
+ useEffect(function () {
45950
+ if (!initialSelectedId || selectedServer || catalog.length === 0) return;
45951
+ var match = catalog.find(function (s) {
45952
+ return s && s.id === initialSelectedId;
45953
+ });
45954
+ if (match) {
45955
+ setSelectedServer(match);
45956
+ }
45957
+ // eslint-disable-next-line react-hooks/exhaustive-deps
45958
+ }, [catalog, initialSelectedId]);
45959
+
45942
45960
  // Filter catalog by search, then sort alphabetically by display name.
45943
45961
  // Built-in and known-external entries are interleaved alphabetically —
45944
45962
  // the per-card "external" badge keeps the source obvious without
@@ -47012,7 +47030,11 @@ var ProvidersSection = function ProvidersSection(_ref) {
47012
47030
  _ref$createRequested = _ref.createRequested,
47013
47031
  createRequested = _ref$createRequested === void 0 ? false : _ref$createRequested,
47014
47032
  _ref$onCreateAcknowle = _ref.onCreateAcknowledged,
47015
- onCreateAcknowledged = _ref$onCreateAcknowle === void 0 ? null : _ref$onCreateAcknowle;
47033
+ onCreateAcknowledged = _ref$onCreateAcknowle === void 0 ? null : _ref$onCreateAcknowle,
47034
+ _ref$initialProviderT = _ref.initialProviderType,
47035
+ initialProviderType = _ref$initialProviderT === void 0 ? null : _ref$initialProviderT,
47036
+ _ref$initialProviderC = _ref.initialProviderClass,
47037
+ initialProviderClass = _ref$initialProviderC === void 0 ? null : _ref$initialProviderC;
47016
47038
  var appContext = useContext(AppContext);
47017
47039
  var providers = (appContext === null || appContext === void 0 ? void 0 : appContext.providers) || {};
47018
47040
  var refreshProviders = appContext === null || appContext === void 0 ? void 0 : appContext.refreshProviders;
@@ -47348,14 +47370,29 @@ var ProvidersSection = function ProvidersSection(_ref) {
47348
47370
  });
47349
47371
  }
47350
47372
 
47351
- // Respond to external create trigger from header
47373
+ // Respond to external create trigger from header (or from the
47374
+ // cross-modal "Add new <type>" event dispatched by the Widget
47375
+ // Builder, with optional initialProviderType/initialProviderClass
47376
+ // for type pre-fill / catalog pre-select).
47352
47377
  var prevCreateRequested = useRef(false);
47353
47378
  useEffect(function () {
47354
47379
  if (createRequested && !prevCreateRequested.current) {
47355
47380
  resetForm();
47356
47381
  setSelectedName(null);
47357
- setIsAddingMcp(false);
47358
- setIsCreating(true);
47382
+ if (initialProviderClass === "mcp") {
47383
+ // MCP class: open the catalog detail. Pre-select happens in
47384
+ // McpCatalogDetail via the initialSelectedId prop passed below.
47385
+ setIsCreating(false);
47386
+ setIsAddingMcp(true);
47387
+ } else {
47388
+ // Credential class (default): open the credential create form
47389
+ // and pre-fill the type field if provided.
47390
+ setIsAddingMcp(false);
47391
+ setIsCreating(true);
47392
+ if (initialProviderType) {
47393
+ setFormType(initialProviderType);
47394
+ }
47395
+ }
47359
47396
  }
47360
47397
  prevCreateRequested.current = createRequested;
47361
47398
  if (createRequested && onCreateAcknowledged) {
@@ -47491,7 +47528,8 @@ var ProvidersSection = function ProvidersSection(_ref) {
47491
47528
  onSave: handleMcpSave,
47492
47529
  onCancel: function onCancel() {
47493
47530
  return setIsAddingMcp(false);
47494
- }
47531
+ },
47532
+ initialSelectedId: initialProviderType
47495
47533
  });
47496
47534
  } else if (isCreating) {
47497
47535
  detailContent = /*#__PURE__*/jsx(ProviderDetail, {
@@ -49221,6 +49259,15 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49221
49259
  _useState14 = _slicedToArray(_useState13, 2),
49222
49260
  packageInfo = _useState14[0],
49223
49261
  setPackageInfo = _useState14[1];
49262
+ // When the main-process pre-publish scan finds personal filesystem
49263
+ // paths in the package source, it returns `{ needsConfirmation: true,
49264
+ // personalPathFindings: [...] }` instead of publishing. We stash the
49265
+ // findings and surface a confirm-or-cancel panel; "Publish anyway"
49266
+ // retries with `confirmPersonalPaths: true`.
49267
+ var _useState15 = useState(null),
49268
+ _useState16 = _slicedToArray(_useState15, 2),
49269
+ personalPathFindings = _useState16[0],
49270
+ setPersonalPathFindings = _useState16[1];
49224
49271
 
49225
49272
  // Reset modal state on open
49226
49273
  useEffect(function () {
@@ -49231,6 +49278,7 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49231
49278
  setIsPublishing(false);
49232
49279
  setResult(null);
49233
49280
  setPackageInfo(null);
49281
+ setPersonalPathFindings(null);
49234
49282
  }, [isOpen]);
49235
49283
 
49236
49284
  // Inspect the package to get its metadata + component list
@@ -49398,10 +49446,18 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49398
49446
  }
49399
49447
  function _handlePublish() {
49400
49448
  _handlePublish = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
49401
- var options, packageId, res, _t3;
49449
+ var _ref4,
49450
+ _ref4$confirmPersonal,
49451
+ confirmPersonalPaths,
49452
+ options,
49453
+ packageId,
49454
+ res,
49455
+ _args4 = arguments,
49456
+ _t3;
49402
49457
  return _regeneratorRuntime.wrap(function (_context4) {
49403
49458
  while (1) switch (_context4.prev = _context4.next) {
49404
49459
  case 0:
49460
+ _ref4 = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {}, _ref4$confirmPersonal = _ref4.confirmPersonalPaths, confirmPersonalPaths = _ref4$confirmPersonal === void 0 ? false : _ref4$confirmPersonal;
49405
49461
  if (widget) {
49406
49462
  _context4.next = 1;
49407
49463
  break;
@@ -49410,18 +49466,28 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49410
49466
  case 1:
49411
49467
  setIsPublishing(true);
49412
49468
  setResult(null);
49469
+ if (!confirmPersonalPaths) setPersonalPathFindings(null);
49413
49470
  _context4.prev = 2;
49414
- options = _objectSpread$k({
49471
+ options = _objectSpread$k(_objectSpread$k({
49415
49472
  visibility: visibility
49416
49473
  }, bump && bump !== "none" ? {
49417
49474
  bump: bump
49475
+ } : {}), confirmPersonalPaths ? {
49476
+ confirmPersonalPaths: true
49418
49477
  } : {});
49419
49478
  packageId = widget.packageId || widget.name;
49420
49479
  _context4.next = 3;
49421
49480
  return window.mainApi.registry.publishWidget(appId, packageId, options);
49422
49481
  case 3:
49423
49482
  res = _context4.sent;
49424
- setResult(res);
49483
+ // Main process asked us to confirm a privacy warning before it ships
49484
+ // the package. Stash the findings and render the confirm panel —
49485
+ // don't mark as a completed result.
49486
+ if (res !== null && res !== void 0 && res.needsConfirmation && (res === null || res === void 0 ? void 0 : res.reason) === "personal-paths") {
49487
+ setPersonalPathFindings(res.personalPathFindings || []);
49488
+ } else {
49489
+ setResult(res);
49490
+ }
49425
49491
  _context4.next = 5;
49426
49492
  break;
49427
49493
  case 4:
@@ -49443,6 +49509,14 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49443
49509
  }));
49444
49510
  return _handlePublish.apply(this, arguments);
49445
49511
  }
49512
+ function handleCancelPersonalPathsConfirm() {
49513
+ setPersonalPathFindings(null);
49514
+ }
49515
+ function handleConfirmPersonalPathsAndPublish() {
49516
+ handlePublish({
49517
+ confirmPersonalPaths: true
49518
+ });
49519
+ }
49446
49520
  if (!widget) return null;
49447
49521
  var currentVersion = widget.version || "1.0.0";
49448
49522
  var newVersion = bumpPreview(currentVersion, bump);
@@ -49487,7 +49561,48 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49487
49561
  className: "text-xs text-red-300",
49488
49562
  children: authError
49489
49563
  })]
49490
- }), authStatus === "authenticated" && !result && /*#__PURE__*/jsxs(Fragment, {
49564
+ }), authStatus === "authenticated" && personalPathFindings && !result && /*#__PURE__*/jsxs("div", {
49565
+ className: "space-y-3",
49566
+ children: [/*#__PURE__*/jsxs("div", {
49567
+ className: "p-3 bg-amber-900/20 border border-amber-700/40 rounded text-sm text-amber-200",
49568
+ children: [/*#__PURE__*/jsxs("div", {
49569
+ className: "font-semibold flex items-center gap-2 mb-1",
49570
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
49571
+ icon: "triangle-exclamation",
49572
+ className: "h-4 w-4"
49573
+ }), "Personal paths detected in this package"]
49574
+ }), /*#__PURE__*/jsxs("div", {
49575
+ className: "text-xs opacity-90",
49576
+ 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__*/jsx("code", {
49577
+ className: "px-1 opacity-90",
49578
+ children: "~/pipeline"
49579
+ }), ") or a schema ", /*#__PURE__*/jsx("code", {
49580
+ className: "px-1 opacity-90",
49581
+ children: "defaultValue"
49582
+ }), " ", "before publishing."]
49583
+ })]
49584
+ }), /*#__PURE__*/jsx("div", {
49585
+ className: "bg-white/5 border border-white/10 rounded-lg divide-y divide-white/10 max-h-60 overflow-y-auto",
49586
+ children: personalPathFindings.map(function (f, idx) {
49587
+ return /*#__PURE__*/jsxs("div", {
49588
+ className: "px-3 py-2 text-xs",
49589
+ children: [/*#__PURE__*/jsxs("div", {
49590
+ className: "font-mono text-amber-200 truncate",
49591
+ children: [f.file, ":", f.line]
49592
+ }), /*#__PURE__*/jsx("div", {
49593
+ className: "font-mono opacity-80 mt-0.5 break-all",
49594
+ children: f.match
49595
+ }), f.context && f.context !== f.match && /*#__PURE__*/jsx("div", {
49596
+ className: "font-mono opacity-50 mt-0.5 truncate",
49597
+ children: f.context
49598
+ })]
49599
+ }, "".concat(f.file, ":").concat(f.line, ":").concat(idx));
49600
+ })
49601
+ }), /*#__PURE__*/jsxs("div", {
49602
+ className: "text-xs opacity-60",
49603
+ children: ["Total findings: ", personalPathFindings.length, personalPathFindings.length >= 50 && " (capped)"]
49604
+ })]
49605
+ }), authStatus === "authenticated" && !result && !personalPathFindings && /*#__PURE__*/jsxs(Fragment, {
49491
49606
  children: [/*#__PURE__*/jsxs("div", {
49492
49607
  className: "bg-white/5 border border-white/10 rounded-lg p-3 text-sm",
49493
49608
  children: [/*#__PURE__*/jsxs("div", {
@@ -49648,16 +49763,29 @@ var PublishWidgetModal = function PublishWidgetModal(_ref) {
49648
49763
  })
49649
49764
  })]
49650
49765
  })]
49651
- }), /*#__PURE__*/jsxs("div", {
49766
+ }), /*#__PURE__*/jsx("div", {
49652
49767
  className: "flex-shrink-0 flex flex-row justify-end gap-2 p-4 border-t border-white/10",
49653
- children: [/*#__PURE__*/jsx(Button3, {
49654
- title: result !== null && result !== void 0 && result.success ? "Close" : "Cancel",
49655
- onClick: handleClose
49656
- }), !(result !== null && result !== void 0 && result.success) && /*#__PURE__*/jsx(Button2, {
49657
- title: isPublishing ? "Publishing…" : "Publish",
49658
- onClick: handlePublish,
49659
- disabled: !canPublish
49660
- })]
49768
+ children: personalPathFindings ? /*#__PURE__*/jsxs(Fragment, {
49769
+ children: [/*#__PURE__*/jsx(Button3, {
49770
+ title: "Go back",
49771
+ onClick: handleCancelPersonalPathsConfirm
49772
+ }), /*#__PURE__*/jsx(Button2, {
49773
+ title: isPublishing ? "Publishing…" : "Publish anyway",
49774
+ onClick: handleConfirmPersonalPathsAndPublish,
49775
+ disabled: isPublishing
49776
+ })]
49777
+ }) : /*#__PURE__*/jsxs(Fragment, {
49778
+ children: [/*#__PURE__*/jsx(Button3, {
49779
+ title: result !== null && result !== void 0 && result.success ? "Close" : "Cancel",
49780
+ onClick: handleClose
49781
+ }), !(result !== null && result !== void 0 && result.success) && /*#__PURE__*/jsx(Button2, {
49782
+ title: isPublishing ? "Publishing…" : "Publish",
49783
+ onClick: function onClick() {
49784
+ return handlePublish();
49785
+ },
49786
+ disabled: !canPublish
49787
+ })]
49788
+ })
49661
49789
  })]
49662
49790
  })
49663
49791
  });
@@ -53183,6 +53311,10 @@ var AppSettingsModal = function AppSettingsModal(_ref) {
53183
53311
  initialProviderName = _ref$initialProviderN === void 0 ? null : _ref$initialProviderN,
53184
53312
  _ref$initialCreatePro = _ref.initialCreateProvider,
53185
53313
  initialCreateProvider = _ref$initialCreatePro === void 0 ? false : _ref$initialCreatePro,
53314
+ _ref$initialProviderT = _ref.initialProviderType,
53315
+ initialProviderType = _ref$initialProviderT === void 0 ? null : _ref$initialProviderT,
53316
+ _ref$initialProviderC = _ref.initialProviderClass,
53317
+ initialProviderClass = _ref$initialProviderC === void 0 ? null : _ref$initialProviderC,
53186
53318
  _ref$workspaces = _ref.workspaces,
53187
53319
  workspaces = _ref$workspaces === void 0 ? [] : _ref$workspaces,
53188
53320
  _ref$menuItems = _ref.menuItems,
@@ -53318,7 +53450,9 @@ var AppSettingsModal = function AppSettingsModal(_ref) {
53318
53450
  return setCreateRequested(false);
53319
53451
  },
53320
53452
  initialProviderName: initialProviderName,
53321
- initialCreateRequested: initialCreateProvider
53453
+ initialCreateRequested: initialCreateProvider,
53454
+ initialProviderType: initialProviderType,
53455
+ initialProviderClass: initialProviderClass
53322
53456
  }), activeSection === "themes" && /*#__PURE__*/jsx(ThemesSection, {
53323
53457
  onOpenThemeEditor: onOpenThemeEditor,
53324
53458
  dashApi: dashApi,
@@ -58170,13 +58304,31 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
58170
58304
  _useState52 = _slicedToArray(_useState51, 2),
58171
58305
  appSettingsCreateProvider = _useState52[0],
58172
58306
  setAppSettingsCreateProvider = _useState52[1];
58307
+ // Optional pre-fills used by the cross-modal "Add new <type>"
58308
+ // flow dispatched from dash-electron's WidgetBuilderModal.
58309
+ // initialProviderType is the type id (e.g. "filesystem", "slack").
58310
+ // initialProviderClass routes the create flow: "mcp" opens the
58311
+ // catalog detail with that type pre-selected; otherwise opens
58312
+ // the credential create form with formType pre-filled.
58313
+ var _useState53 = useState(null),
58314
+ _useState54 = _slicedToArray(_useState53, 2),
58315
+ appSettingsInitialProviderType = _useState54[0],
58316
+ setAppSettingsInitialProviderType = _useState54[1];
58317
+ var _useState55 = useState(null),
58318
+ _useState56 = _slicedToArray(_useState55, 2),
58319
+ appSettingsInitialProviderClass = _useState56[0],
58320
+ setAppSettingsInitialProviderClass = _useState56[1];
58173
58321
  function openAppSettings() {
58174
58322
  var section = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "general";
58175
58323
  var providerName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
58176
58324
  var createProvider = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
58325
+ var providerType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
58326
+ var providerClass = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
58177
58327
  setAppSettingsInitialSection(section);
58178
58328
  setAppSettingsInitialProvider(providerName);
58179
58329
  setAppSettingsCreateProvider(createProvider);
58330
+ setAppSettingsInitialProviderType(providerType);
58331
+ setAppSettingsInitialProviderClass(providerClass);
58180
58332
  setIsAppSettingsOpen(true);
58181
58333
  }
58182
58334
  function handleProfileUpdated() {
@@ -58268,6 +58420,27 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
58268
58420
  };
58269
58421
  }, [changeCurrentTheme]);
58270
58422
 
58423
+ // ─── Listen for "open Settings to create a provider of type X" ──
58424
+ // Dispatched by dash-electron's Widget Builder PreviewProviderPicker
58425
+ // when the user clicks "Add new <type>" because no instances of the
58426
+ // chosen type exist yet. Detail: { type, providerClass }. The
58427
+ // Widget Builder's own listener (in dash-electron/Dash.js) handles
58428
+ // closing the builder modal — this listener only opens Settings.
58429
+ useEffect(function () {
58430
+ var handler = function handler(e) {
58431
+ var _ref4 = (e === null || e === void 0 ? void 0 : e.detail) || {},
58432
+ type = _ref4.type,
58433
+ providerClass = _ref4.providerClass;
58434
+ if (!type) return;
58435
+ openAppSettings("providers", null, true, type, providerClass || null);
58436
+ };
58437
+ window.addEventListener("dash:open-settings-create-provider", handler);
58438
+ return function () {
58439
+ return window.removeEventListener("dash:open-settings-create-provider", handler);
58440
+ };
58441
+ // eslint-disable-next-line react-hooks/exhaustive-deps
58442
+ }, []);
58443
+
58271
58444
  // ─── Listen for external "open workspace" requests ──────────────
58272
58445
  // Fired by: Dash.js notification click, MCP state-changed for
58273
58446
  // create_dashboard, etc. Any code that wants to switch the active
@@ -58277,10 +58450,10 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
58277
58450
  // We record the requested ID and open it once it appears in
58278
58451
  // workspaceConfig — handles the case where the workspace was just
58279
58452
  // created and the config reload is still in flight.
58280
- var _useState53 = useState(null),
58281
- _useState54 = _slicedToArray(_useState53, 2),
58282
- pendingOpenWorkspaceId = _useState54[0],
58283
- setPendingOpenWorkspaceId = _useState54[1];
58453
+ var _useState57 = useState(null),
58454
+ _useState58 = _slicedToArray(_useState57, 2),
58455
+ pendingOpenWorkspaceId = _useState58[0],
58456
+ setPendingOpenWorkspaceId = _useState58[1];
58284
58457
  useEffect(function () {
58285
58458
  var handler = function handler(e) {
58286
58459
  var _e$detail2;
@@ -58902,10 +59075,10 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
58902
59075
  }
58903
59076
 
58904
59077
  // ─── Page State ──────────────────────────────────────────────────
58905
- var _useState55 = useState(null),
58906
- _useState56 = _slicedToArray(_useState55, 2),
58907
- activePageId = _useState56[0],
58908
- setActivePageId = _useState56[1];
59078
+ var _useState59 = useState(null),
59079
+ _useState60 = _slicedToArray(_useState59, 2),
59080
+ activePageId = _useState60[0],
59081
+ setActivePageId = _useState60[1];
58909
59082
 
58910
59083
  // Page history stack for goBack() — pushes the previous page id
58911
59084
  // whenever a navigation happens through navigateToPage().
@@ -58939,9 +59112,9 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
58939
59112
  // Listen for programmatic page switches via DashboardActionsApi
58940
59113
  useEffect(function () {
58941
59114
  function onSwitchPage(e) {
58942
- var _ref4 = e.detail || {},
58943
- pageId = _ref4.pageId,
58944
- pageName = _ref4.pageName;
59115
+ var _ref5 = e.detail || {},
59116
+ pageId = _ref5.pageId,
59117
+ pageName = _ref5.pageName;
58945
59118
  if (pageId) {
58946
59119
  navigateToPage(pageId);
58947
59120
  } else if (pageName) {
@@ -59796,11 +59969,15 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
59796
59969
  if (!open) {
59797
59970
  setAppSettingsInitialProvider(null);
59798
59971
  setAppSettingsCreateProvider(false);
59972
+ setAppSettingsInitialProviderType(null);
59973
+ setAppSettingsInitialProviderClass(null);
59799
59974
  }
59800
59975
  },
59801
59976
  initialSection: appSettingsInitialSection,
59802
59977
  initialProviderName: appSettingsInitialProvider,
59803
59978
  initialCreateProvider: appSettingsCreateProvider,
59979
+ initialProviderType: appSettingsInitialProviderType,
59980
+ initialProviderClass: appSettingsInitialProviderClass,
59804
59981
  workspaces: workspaceConfig,
59805
59982
  menuItems: menuItems,
59806
59983
  dashApi: dashApi,
@@ -62612,15 +62789,6 @@ function ChatCore(_ref) {
62612
62789
  }
62613
62790
  };
62614
62791
 
62615
- // End CLI session
62616
- var handleEndSession = function handleEndSession() {
62617
- var _mainApi$llm4;
62618
- if (!isCliBackend || !(mainApi !== null && mainApi !== void 0 && (_mainApi$llm4 = mainApi.llm) !== null && _mainApi$llm4 !== void 0 && _mainApi$llm4.endCliSession)) return;
62619
- if (isLoading) handleStop();
62620
- mainApi.llm.endCliSession(uuid || persistKey || sessionKey);
62621
- setSessionActive(false);
62622
- };
62623
-
62624
62792
  // Toggle tool
62625
62793
  var handleToggleTool = function handleToggleTool(toolName) {
62626
62794
  setEnabledTools(function (prev) {
@@ -62645,29 +62813,21 @@ function ChatCore(_ref) {
62645
62813
  className: "inline-block w-2 h-2 rounded-full bg-green-400",
62646
62814
  title: "CLI session active"
62647
62815
  })]
62648
- }), /*#__PURE__*/jsxs("div", {
62816
+ }), /*#__PURE__*/jsx("div", {
62649
62817
  className: "flex items-center gap-1",
62650
- children: [isCliBackend && sessionActive && /*#__PURE__*/jsx("button", {
62651
- onClick: handleEndSession,
62652
- className: "px-2 py-1 text-xs rounded bg-red-900/50 hover:bg-red-800/50 text-red-300 transition-colors",
62653
- children: "End Session"
62654
- }), /*#__PURE__*/jsx("button", {
62818
+ children: /*#__PURE__*/jsx("button", {
62655
62819
  onClick: handleNewChat,
62656
62820
  className: "px-2 py-1 text-xs rounded bg-gray-700 hover:bg-gray-600 text-gray-300 transition-colors",
62657
62821
  children: "New Chat"
62658
- })]
62822
+ })
62659
62823
  })]
62660
- }) : /*#__PURE__*/jsxs("div", {
62824
+ }) : /*#__PURE__*/jsx("div", {
62661
62825
  className: "flex items-center justify-end px-3 py-1 shrink-0",
62662
- children: [isCliBackend && sessionActive && /*#__PURE__*/jsx("button", {
62663
- onClick: handleEndSession,
62664
- className: "px-2 py-1 text-xs rounded bg-red-900/50 hover:bg-red-800/50 text-red-300 transition-colors mr-1",
62665
- children: "End Session"
62666
- }), /*#__PURE__*/jsx("button", {
62826
+ children: /*#__PURE__*/jsx("button", {
62667
62827
  onClick: handleNewChat,
62668
62828
  className: "px-2 py-1 text-xs rounded bg-gray-700 hover:bg-gray-600 text-gray-300 transition-colors",
62669
62829
  children: "New Chat"
62670
- })]
62830
+ })
62671
62831
  }), error && /*#__PURE__*/jsxs("div", {
62672
62832
  className: "mx-3 mt-2 p-2 bg-red-900/30 border border-red-700 rounded text-red-300 text-xs",
62673
62833
  children: [error, /*#__PURE__*/jsx("button", {