@opentabs-dev/browser-extension 0.0.65 → 0.0.66

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.
@@ -61446,6 +61446,10 @@ var setSkipPermissions = (skipPermissions) => sendBgMessage({
61446
61446
  type: "bg:setSkipPermissions",
61447
61447
  skipPermissions
61448
61448
  });
61449
+ var openPluginTab = (pluginName) => sendBgMessage({
61450
+ type: "bg:openPluginTab",
61451
+ pluginName
61452
+ });
61449
61453
  var sendConfirmationResponse = (id, decision, alwaysAllow) => {
61450
61454
  chrome.runtime.sendMessage({
61451
61455
  type: "sp:confirmationResponse",
@@ -79428,7 +79432,7 @@ var import_compiler_runtime23 = __toESM(require_compiler_runtime(), 1);
79428
79432
  var import_react19 = __toESM(require_react(), 1);
79429
79433
  var import_jsx_runtime49 = __toESM(require_jsx_runtime(), 1);
79430
79434
  var PluginMenu = (t0) => {
79431
- const $2 = (0, import_compiler_runtime23.c)(57);
79435
+ const $2 = (0, import_compiler_runtime23.c)(62);
79432
79436
  const {
79433
79437
  plugin,
79434
79438
  onUpdate,
@@ -79492,8 +79496,36 @@ var PluginMenu = (t0) => {
79492
79496
  t5 = $2[8];
79493
79497
  }
79494
79498
  let t6;
79495
- if ($2[9] !== onUpdate || $2[10] !== plugin.update || $2[11] !== updating) {
79496
- t6 = plugin.update && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Item, {
79499
+ if ($2[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
79500
+ t6 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Package, {
79501
+ className: "h-3.5 w-3.5"
79502
+ });
79503
+ $2[9] = t6;
79504
+ } else {
79505
+ t6 = $2[9];
79506
+ }
79507
+ let t7;
79508
+ if ($2[10] !== plugin.version) {
79509
+ t7 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Item, {
79510
+ disabled: true,
79511
+ className: "text-muted-foreground",
79512
+ children: [t6, "v", plugin.version]
79513
+ });
79514
+ $2[10] = plugin.version;
79515
+ $2[11] = t7;
79516
+ } else {
79517
+ t7 = $2[11];
79518
+ }
79519
+ let t8;
79520
+ if ($2[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
79521
+ t8 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MenuObject.Separator, {});
79522
+ $2[12] = t8;
79523
+ } else {
79524
+ t8 = $2[12];
79525
+ }
79526
+ let t9;
79527
+ if ($2[13] !== onUpdate || $2[14] !== plugin.update || $2[15] !== updating) {
79528
+ t9 = plugin.update && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Item, {
79497
79529
  onClick: onUpdate,
79498
79530
  children: [updating ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Loader2, {
79499
79531
  size: "sm"
@@ -79501,147 +79533,148 @@ var PluginMenu = (t0) => {
79501
79533
  className: "h-3.5 w-3.5"
79502
79534
  }), "Update to v", plugin.update.latestVersion]
79503
79535
  });
79504
- $2[9] = onUpdate;
79505
- $2[10] = plugin.update;
79506
- $2[11] = updating;
79507
- $2[12] = t6;
79536
+ $2[13] = onUpdate;
79537
+ $2[14] = plugin.update;
79538
+ $2[15] = updating;
79539
+ $2[16] = t9;
79508
79540
  } else {
79509
- t6 = $2[12];
79541
+ t9 = $2[16];
79510
79542
  }
79511
- let t7;
79512
- if ($2[13] !== plugin.update) {
79513
- t7 = plugin.update && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MenuObject.Separator, {});
79514
- $2[13] = plugin.update;
79515
- $2[14] = t7;
79543
+ let t10;
79544
+ if ($2[17] !== plugin.update) {
79545
+ t10 = plugin.update && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MenuObject.Separator, {});
79546
+ $2[17] = plugin.update;
79547
+ $2[18] = t10;
79516
79548
  } else {
79517
- t7 = $2[14];
79549
+ t10 = $2[18];
79518
79550
  }
79519
- let t8;
79520
- if ($2[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
79521
- t8 = () => setConfirmOpen(true);
79522
- $2[15] = t8;
79551
+ let t11;
79552
+ if ($2[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
79553
+ t11 = () => setConfirmOpen(true);
79554
+ $2[19] = t11;
79523
79555
  } else {
79524
- t8 = $2[15];
79556
+ t11 = $2[19];
79525
79557
  }
79526
- let t9;
79527
- if ($2[16] !== removing) {
79528
- t9 = removing ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Loader2, {
79558
+ let t12;
79559
+ if ($2[20] !== removing) {
79560
+ t12 = removing ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Loader2, {
79529
79561
  size: "sm"
79530
79562
  }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Trash2, {
79531
79563
  className: "h-3.5 w-3.5"
79532
79564
  });
79533
- $2[16] = removing;
79534
- $2[17] = t9;
79565
+ $2[20] = removing;
79566
+ $2[21] = t12;
79535
79567
  } else {
79536
- t9 = $2[17];
79568
+ t12 = $2[21];
79537
79569
  }
79538
- let t10;
79539
- if ($2[18] !== removeLabel || $2[19] !== t9) {
79540
- t10 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Item, {
79541
- onSelect: t8,
79570
+ let t13;
79571
+ if ($2[22] !== removeLabel || $2[23] !== t12) {
79572
+ t13 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Item, {
79573
+ onSelect: t11,
79542
79574
  className: "text-destructive focus:bg-destructive/10 focus:text-destructive data-[highlighted]:bg-destructive/10 data-[highlighted]:text-destructive",
79543
- children: [t9, removeLabel]
79575
+ children: [t12, removeLabel]
79544
79576
  });
79545
- $2[18] = removeLabel;
79546
- $2[19] = t9;
79547
- $2[20] = t10;
79577
+ $2[22] = removeLabel;
79578
+ $2[23] = t12;
79579
+ $2[24] = t13;
79548
79580
  } else {
79549
- t10 = $2[20];
79581
+ t13 = $2[24];
79550
79582
  }
79551
- let t11;
79552
- if ($2[21] !== t10 || $2[22] !== t6 || $2[23] !== t7) {
79553
- t11 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Content, {
79583
+ let t14;
79584
+ if ($2[25] !== t10 || $2[26] !== t13 || $2[27] !== t7 || $2[28] !== t9) {
79585
+ t14 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject.Content, {
79554
79586
  align: "end",
79555
- children: [t6, t7, t10]
79587
+ children: [t7, t8, t9, t10, t13]
79556
79588
  });
79557
- $2[21] = t10;
79558
- $2[22] = t6;
79559
- $2[23] = t7;
79560
- $2[24] = t11;
79589
+ $2[25] = t10;
79590
+ $2[26] = t13;
79591
+ $2[27] = t7;
79592
+ $2[28] = t9;
79593
+ $2[29] = t14;
79561
79594
  } else {
79562
- t11 = $2[24];
79595
+ t14 = $2[29];
79563
79596
  }
79564
- let t12;
79565
- if ($2[25] !== t11 || $2[26] !== t5) {
79566
- t12 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject, {
79567
- children: [t5, t11]
79597
+ let t15;
79598
+ if ($2[30] !== t14 || $2[31] !== t5) {
79599
+ t15 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(MenuObject, {
79600
+ children: [t5, t14]
79568
79601
  });
79569
- $2[25] = t11;
79570
- $2[26] = t5;
79571
- $2[27] = t12;
79602
+ $2[30] = t14;
79603
+ $2[31] = t5;
79604
+ $2[32] = t15;
79572
79605
  } else {
79573
- t12 = $2[27];
79606
+ t15 = $2[32];
79574
79607
  }
79575
- let t13;
79576
- if ($2[28] !== removeLabel) {
79577
- t13 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Header, {
79608
+ let t16;
79609
+ if ($2[33] !== removeLabel) {
79610
+ t16 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Header, {
79578
79611
  className: "border-destructive bg-destructive text-destructive-foreground",
79579
79612
  children: [removeLabel, " Plugin"]
79580
79613
  });
79581
- $2[28] = removeLabel;
79582
- $2[29] = t13;
79614
+ $2[33] = removeLabel;
79615
+ $2[34] = t16;
79583
79616
  } else {
79584
- t13 = $2[29];
79617
+ t16 = $2[34];
79585
79618
  }
79586
- let t14;
79587
- if ($2[30] !== removeLabel) {
79588
- t14 = removeLabel.toLowerCase();
79589
- $2[30] = removeLabel;
79590
- $2[31] = t14;
79619
+ let t17;
79620
+ if ($2[35] !== removeLabel) {
79621
+ t17 = removeLabel.toLowerCase();
79622
+ $2[35] = removeLabel;
79623
+ $2[36] = t17;
79591
79624
  } else {
79592
- t14 = $2[31];
79625
+ t17 = $2[36];
79593
79626
  }
79594
- let t15;
79595
- if ($2[32] !== plugin.displayName) {
79596
- t15 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", {
79627
+ let t18;
79628
+ if ($2[37] !== plugin.displayName) {
79629
+ t18 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("strong", {
79597
79630
  className: "font-head",
79598
79631
  children: plugin.displayName
79599
79632
  });
79600
- $2[32] = plugin.displayName;
79601
- $2[33] = t15;
79633
+ $2[37] = plugin.displayName;
79634
+ $2[38] = t18;
79602
79635
  } else {
79603
- t15 = $2[33];
79636
+ t18 = $2[38];
79604
79637
  }
79605
- let t16;
79606
- if ($2[34] !== t14 || $2[35] !== t15) {
79607
- t16 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", {
79638
+ let t19;
79639
+ if ($2[39] !== t17 || $2[40] !== t18) {
79640
+ t19 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", {
79608
79641
  className: "text-foreground text-sm",
79609
- children: ["Are you sure you want to ", t14, " ", t15, "?"]
79642
+ children: ["Are you sure you want to ", t17, " ", t18, "?"]
79610
79643
  });
79611
- $2[34] = t14;
79612
- $2[35] = t15;
79613
- $2[36] = t16;
79644
+ $2[39] = t17;
79645
+ $2[40] = t18;
79646
+ $2[41] = t19;
79614
79647
  } else {
79615
- t16 = $2[36];
79648
+ t19 = $2[41];
79616
79649
  }
79617
- let t17;
79618
- if ($2[37] !== isLocal) {
79619
- t17 = isLocal ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", {
79650
+ let t20;
79651
+ if ($2[42] !== isLocal) {
79652
+ t20 = isLocal ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", {
79620
79653
  className: "mt-1 text-muted-foreground text-xs",
79621
79654
  children: "This will remove the plugin path from your config."
79622
79655
  }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", {
79623
79656
  className: "mt-1 text-muted-foreground text-xs",
79624
79657
  children: "This will run npm uninstall and remove the plugin globally."
79625
79658
  });
79626
- $2[37] = isLocal;
79627
- $2[38] = t17;
79659
+ $2[42] = isLocal;
79660
+ $2[43] = t20;
79628
79661
  } else {
79629
- t17 = $2[38];
79662
+ t20 = $2[43];
79630
79663
  }
79631
- let t18;
79632
- if ($2[39] !== t16 || $2[40] !== t17) {
79633
- t18 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Body, {
79634
- children: [t16, t17]
79664
+ let t21;
79665
+ if ($2[44] !== t19 || $2[45] !== t20) {
79666
+ t21 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Body, {
79667
+ children: [t19, t20]
79635
79668
  });
79636
- $2[39] = t16;
79637
- $2[40] = t17;
79638
- $2[41] = t18;
79669
+ $2[44] = t19;
79670
+ $2[45] = t20;
79671
+ $2[46] = t21;
79639
79672
  } else {
79640
- t18 = $2[41];
79673
+ t21 = $2[46];
79641
79674
  }
79642
- let t19;
79643
- if ($2[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
79644
- t19 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogObject.Close, {
79675
+ let t22;
79676
+ if ($2[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
79677
+ t22 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogObject.Close, {
79645
79678
  asChild: true,
79646
79679
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, {
79647
79680
  size: "sm",
@@ -79649,14 +79682,14 @@ var PluginMenu = (t0) => {
79649
79682
  children: "Cancel"
79650
79683
  })
79651
79684
  });
79652
- $2[42] = t19;
79685
+ $2[47] = t22;
79653
79686
  } else {
79654
- t19 = $2[42];
79687
+ t22 = $2[47];
79655
79688
  }
79656
- let t20;
79657
- if ($2[43] !== handleConfirmRemove || $2[44] !== removeLabel) {
79658
- t20 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Footer, {
79659
- children: [t19, /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, {
79689
+ let t23;
79690
+ if ($2[48] !== handleConfirmRemove || $2[49] !== removeLabel) {
79691
+ t23 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Footer, {
79692
+ children: [t22, /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, {
79660
79693
  size: "sm",
79661
79694
  variant: "outline",
79662
79695
  className: "border-destructive text-destructive",
@@ -79664,54 +79697,54 @@ var PluginMenu = (t0) => {
79664
79697
  children: removeLabel
79665
79698
  })]
79666
79699
  });
79667
- $2[43] = handleConfirmRemove;
79668
- $2[44] = removeLabel;
79669
- $2[45] = t20;
79700
+ $2[48] = handleConfirmRemove;
79701
+ $2[49] = removeLabel;
79702
+ $2[50] = t23;
79670
79703
  } else {
79671
- t20 = $2[45];
79704
+ t23 = $2[50];
79672
79705
  }
79673
- let t21;
79674
- if ($2[46] !== t13 || $2[47] !== t18 || $2[48] !== t20) {
79675
- t21 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Content, {
79676
- children: [t13, t18, t20]
79706
+ let t24;
79707
+ if ($2[51] !== t16 || $2[52] !== t21 || $2[53] !== t23) {
79708
+ t24 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DialogObject.Content, {
79709
+ children: [t16, t21, t23]
79677
79710
  });
79678
- $2[46] = t13;
79679
- $2[47] = t18;
79680
- $2[48] = t20;
79681
- $2[49] = t21;
79711
+ $2[51] = t16;
79712
+ $2[52] = t21;
79713
+ $2[53] = t23;
79714
+ $2[54] = t24;
79682
79715
  } else {
79683
- t21 = $2[49];
79716
+ t24 = $2[54];
79684
79717
  }
79685
- let t22;
79686
- if ($2[50] !== confirmOpen || $2[51] !== t21) {
79687
- t22 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogObject, {
79718
+ let t25;
79719
+ if ($2[55] !== confirmOpen || $2[56] !== t24) {
79720
+ t25 = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DialogObject, {
79688
79721
  open: confirmOpen,
79689
79722
  onOpenChange: setConfirmOpen,
79690
- children: t21
79723
+ children: t24
79691
79724
  });
79692
- $2[50] = confirmOpen;
79693
- $2[51] = t21;
79694
- $2[52] = t22;
79725
+ $2[55] = confirmOpen;
79726
+ $2[56] = t24;
79727
+ $2[57] = t25;
79695
79728
  } else {
79696
- t22 = $2[52];
79729
+ t25 = $2[57];
79697
79730
  }
79698
- let t23;
79699
- if ($2[53] !== className || $2[54] !== t12 || $2[55] !== t22) {
79700
- t23 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", {
79731
+ let t26;
79732
+ if ($2[58] !== className || $2[59] !== t15 || $2[60] !== t25) {
79733
+ t26 = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", {
79701
79734
  className,
79702
79735
  onClick: _temp8,
79703
79736
  onKeyDown: _temp25,
79704
79737
  role: "presentation",
79705
- children: [t12, t22]
79738
+ children: [t15, t25]
79706
79739
  });
79707
- $2[53] = className;
79708
- $2[54] = t12;
79709
- $2[55] = t22;
79710
- $2[56] = t23;
79740
+ $2[58] = className;
79741
+ $2[59] = t15;
79742
+ $2[60] = t25;
79743
+ $2[61] = t26;
79711
79744
  } else {
79712
- t23 = $2[56];
79745
+ t26 = $2[61];
79713
79746
  }
79714
- return t23;
79747
+ return t26;
79715
79748
  };
79716
79749
  PluginMenu.displayName = "PluginMenu";
79717
79750
  function _temp8(e2) {
@@ -79798,7 +79831,7 @@ Badge2.displayName = "Badge";
79798
79831
  // src/side-panel/components/PluginCard.tsx
79799
79832
  var import_jsx_runtime51 = __toESM(require_jsx_runtime(), 1);
79800
79833
  var PluginCard = (t0) => {
79801
- const $2 = (0, import_compiler_runtime25.c)(56);
79834
+ const $2 = (0, import_compiler_runtime25.c)(59);
79802
79835
  const {
79803
79836
  plugin,
79804
79837
  activeTools,
@@ -79893,10 +79926,10 @@ var PluginCard = (t0) => {
79893
79926
  const myVersion_0 = toggleCounter.current = toggleCounter.current + 1;
79894
79927
  updatePluginTools((prev_2) => {
79895
79928
  preToggleRef.current = prev_2;
79896
- return prev_2.map((t35) => t35.name === toolName ? {
79897
- ...t35,
79929
+ return prev_2.map((t36) => t36.name === toolName ? {
79930
+ ...t36,
79898
79931
  permission: newPermission_1
79899
- } : t35);
79932
+ } : t36);
79900
79933
  });
79901
79934
  setToolPermission(plugin.name, toolName, newPermission_1).catch(() => {
79902
79935
  if (toggleCounter.current === myVersion_0) {
@@ -79932,6 +79965,21 @@ var PluginCard = (t0) => {
79932
79965
  const hasActiveTool = pluginTools.some(t4);
79933
79966
  const toolGroups = groupTools(visibleTools);
79934
79967
  const inactive = plugin.tabState !== "ready";
79968
+ const tabCount = plugin.tabs?.length ?? 0;
79969
+ const hasHomepage = Boolean(plugin.homepage);
79970
+ const isClickable = tabCount > 0 || hasHomepage;
79971
+ const tooltipText = isClickable ? plugin.tabState === "closed" ? `Open ${plugin.displayName} in new tab` : tabCount > 1 ? `Open ${plugin.displayName} (${tabCount} tabs)` : `Open ${plugin.displayName}` : void 0;
79972
+ let t5;
79973
+ if ($2[8] !== plugin.name) {
79974
+ t5 = () => {
79975
+ openPluginTab(plugin.name);
79976
+ };
79977
+ $2[8] = plugin.name;
79978
+ $2[9] = t5;
79979
+ } else {
79980
+ t5 = $2[9];
79981
+ }
79982
+ const handleOpenTab = t5;
79935
79983
  const renderToolList = (tools) => tools.map((tool) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToolRow, {
79936
79984
  name: tool.name,
79937
79985
  displayName: tool.displayName,
@@ -79943,16 +79991,6 @@ var PluginCard = (t0) => {
79943
79991
  muted: inactive,
79944
79992
  onPermissionChange: handleToolPermissionChange
79945
79993
  }, tool.name));
79946
- let t5;
79947
- if ($2[8] !== plugin.version) {
79948
- t5 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(TooltipObject.Content, {
79949
- children: ["v", plugin.version]
79950
- });
79951
- $2[8] = plugin.version;
79952
- $2[9] = t5;
79953
- } else {
79954
- t5 = $2[9];
79955
- }
79956
79994
  const t6 = `flex min-w-0 flex-1 items-center gap-1.5 truncate font-head text-sm ${inactive ? "text-muted-foreground" : "text-foreground"}`;
79957
79995
  let t7;
79958
79996
  if ($2[10] !== plugin.source) {
@@ -80009,62 +80047,74 @@ var PluginCard = (t0) => {
80009
80047
  } else {
80010
80048
  t11 = $2[20];
80011
80049
  }
80012
- const t12 = onUpdate ?? _temp9;
80013
- const t13 = onRemove ?? _temp26;
80014
- const t14 = updatingPlugin ?? false;
80015
- const t15 = removingPlugin ?? false;
80016
- let t16;
80017
- if ($2[21] !== inactive || $2[22] !== plugin || $2[23] !== t12 || $2[24] !== t13 || $2[25] !== t14 || $2[26] !== t15) {
80018
- t16 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PluginMenu, {
80050
+ let t12;
80051
+ if ($2[21] !== t11 || $2[22] !== t9) {
80052
+ t12 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Trigger2, {
80053
+ className: "focus-ring flex min-w-0 flex-1 cursor-pointer items-center gap-2 py-2 pr-0 pl-2 [&[data-state=open]>svg]:rotate-180",
80054
+ children: [t9, t11]
80055
+ });
80056
+ $2[21] = t11;
80057
+ $2[22] = t9;
80058
+ $2[23] = t12;
80059
+ } else {
80060
+ t12 = $2[23];
80061
+ }
80062
+ const t13 = onUpdate ?? _temp9;
80063
+ const t14 = onRemove ?? _temp26;
80064
+ const t15 = updatingPlugin ?? false;
80065
+ const t16 = removingPlugin ?? false;
80066
+ let t17;
80067
+ if ($2[24] !== inactive || $2[25] !== plugin || $2[26] !== t13 || $2[27] !== t14 || $2[28] !== t15 || $2[29] !== t16) {
80068
+ t17 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PluginMenu, {
80019
80069
  plugin,
80020
- onUpdate: t12,
80021
- onRemove: t13,
80022
- updating: t14,
80023
- removing: t15,
80070
+ onUpdate: t13,
80071
+ onRemove: t14,
80072
+ updating: t15,
80073
+ removing: t16,
80024
80074
  muted: inactive,
80025
80075
  className: "flex shrink-0 items-center px-1"
80026
80076
  });
80027
- $2[21] = inactive;
80028
- $2[22] = plugin;
80029
- $2[23] = t12;
80030
- $2[24] = t13;
80031
- $2[25] = t14;
80032
- $2[26] = t15;
80033
- $2[27] = t16;
80077
+ $2[24] = inactive;
80078
+ $2[25] = plugin;
80079
+ $2[26] = t13;
80080
+ $2[27] = t14;
80081
+ $2[28] = t15;
80082
+ $2[29] = t16;
80083
+ $2[30] = t17;
80034
80084
  } else {
80035
- t16 = $2[27];
80085
+ t17 = $2[30];
80036
80086
  }
80037
- let t17;
80038
- if ($2[28] !== toggleError) {
80039
- t17 = toggleError && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AlertComponent, {
80087
+ let t18;
80088
+ if ($2[31] !== toggleError) {
80089
+ t18 = toggleError && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AlertComponent, {
80040
80090
  status: "error",
80041
80091
  className: "mx-3 mb-1 px-2 py-1 text-xs",
80042
80092
  children: toggleError
80043
80093
  });
80044
- $2[28] = toggleError;
80045
- $2[29] = t17;
80094
+ $2[31] = toggleError;
80095
+ $2[32] = t18;
80046
80096
  } else {
80047
- t17 = $2[29];
80097
+ t18 = $2[32];
80048
80098
  }
80049
- let t18;
80050
- if ($2[30] !== actionError) {
80051
- t18 = actionError && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AlertComponent, {
80099
+ let t19;
80100
+ if ($2[33] !== actionError) {
80101
+ t19 = actionError && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AlertComponent, {
80052
80102
  status: "error",
80053
80103
  className: "mx-3 mb-1 px-2 py-1 text-xs",
80054
80104
  children: actionError
80055
80105
  });
80056
- $2[30] = actionError;
80057
- $2[31] = t18;
80106
+ $2[33] = actionError;
80107
+ $2[34] = t19;
80058
80108
  } else {
80059
- t18 = $2[31];
80109
+ t19 = $2[34];
80060
80110
  }
80061
- const t19 = AccordionComponent;
80062
- const t20 = "border-border border-t";
80063
- const t21 = toolFilter && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", {
80111
+ const t20 = AccordionComponent;
80112
+ const t21 = "border-border border-t";
80113
+ const t22 = toolFilter && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", {
80064
80114
  className: "mb-1 px-3 pt-2 text-muted-foreground text-xs",
80065
80115
  children: [visibleTools.length, " of ", pluginTools.length, " tools"]
80066
80116
  });
80067
- const t22 = toolGroups !== null ? toolGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", {
80117
+ const t23 = toolGroups !== null ? toolGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", {
80068
80118
  className: "[&:not(:first-child)]:mt-2",
80069
80119
  children: [/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {
80070
80120
  className: "border-border border-b border-l-2 border-l-primary bg-muted/30 px-3 py-1",
@@ -80074,83 +80124,83 @@ var PluginCard = (t0) => {
80074
80124
  })
80075
80125
  }), renderToolList(group.tools)]
80076
80126
  }, group.name)) : renderToolList(visibleTools);
80077
- let t23;
80078
- if ($2[32] !== t19.Content || $2[33] !== t21 || $2[34] !== t22) {
80079
- t23 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(t19.Content, {
80080
- className: t20,
80081
- children: [t21, t22]
80127
+ let t24;
80128
+ if ($2[35] !== t20.Content || $2[36] !== t22 || $2[37] !== t23) {
80129
+ t24 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(t20.Content, {
80130
+ className: t21,
80131
+ children: [t22, t23]
80082
80132
  });
80083
- $2[32] = t19.Content;
80084
- $2[33] = t21;
80085
- $2[34] = t22;
80086
- $2[35] = t23;
80087
- } else {
80088
- t23 = $2[35];
80089
- }
80090
- const t24 = pendingChange !== null;
80091
- let t25;
80092
- if ($2[36] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80093
- t25 = (open) => !open && setPendingChange(null);
80094
- $2[36] = t25;
80133
+ $2[35] = t20.Content;
80134
+ $2[36] = t22;
80135
+ $2[37] = t23;
80136
+ $2[38] = t24;
80095
80137
  } else {
80096
- t25 = $2[36];
80138
+ t24 = $2[38];
80097
80139
  }
80140
+ const t25 = pendingChange !== null;
80098
80141
  let t26;
80099
- if ($2[37] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80100
- t26 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogObject.Header, {
80101
- children: "Unreviewed Plugin"
80102
- });
80103
- $2[37] = t26;
80142
+ if ($2[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80143
+ t26 = (open) => !open && setPendingChange(null);
80144
+ $2[39] = t26;
80104
80145
  } else {
80105
- t26 = $2[37];
80146
+ t26 = $2[39];
80106
80147
  }
80107
80148
  let t27;
80108
- if ($2[38] !== plugin.displayName || $2[39] !== plugin.version) {
80109
- t27 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", {
80110
- className: "font-mono text-foreground text-sm",
80111
- children: [plugin.displayName, " v", plugin.version]
80149
+ if ($2[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80150
+ t27 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogObject.Header, {
80151
+ children: "Unreviewed Plugin"
80112
80152
  });
80113
- $2[38] = plugin.displayName;
80114
- $2[39] = plugin.version;
80115
80153
  $2[40] = t27;
80116
80154
  } else {
80117
80155
  t27 = $2[40];
80118
80156
  }
80119
80157
  let t28;
80120
- if ($2[41] !== plugin.name) {
80158
+ if ($2[41] !== plugin.displayName || $2[42] !== plugin.version) {
80121
80159
  t28 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", {
80122
- className: "mt-2 text-foreground text-sm",
80123
- children: ["This plugin version has not been reviewed. You can ask your AI agent to review the adapter code by saying \u201Creview the ", plugin.name, " plugin\u201D in your chat."]
80160
+ className: "font-mono text-foreground text-sm",
80161
+ children: [plugin.displayName, " v", plugin.version]
80124
80162
  });
80125
- $2[41] = plugin.name;
80126
- $2[42] = t28;
80163
+ $2[41] = plugin.displayName;
80164
+ $2[42] = plugin.version;
80165
+ $2[43] = t28;
80127
80166
  } else {
80128
- t28 = $2[42];
80167
+ t28 = $2[43];
80129
80168
  }
80130
80169
  let t29;
80131
- if ($2[43] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80132
- t29 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", {
80133
- className: "mt-2 text-muted-foreground text-xs",
80134
- children: "You can also enable it now without review."
80170
+ if ($2[44] !== plugin.name) {
80171
+ t29 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", {
80172
+ className: "mt-2 text-foreground text-sm",
80173
+ children: ["This plugin version has not been reviewed. You can ask your AI agent to review the adapter code by saying \u201Creview the ", plugin.name, " plugin\u201D in your chat."]
80135
80174
  });
80136
- $2[43] = t29;
80175
+ $2[44] = plugin.name;
80176
+ $2[45] = t29;
80137
80177
  } else {
80138
- t29 = $2[43];
80178
+ t29 = $2[45];
80139
80179
  }
80140
80180
  let t30;
80141
- if ($2[44] !== t27 || $2[45] !== t28) {
80142
- t30 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogObject.Body, {
80143
- children: [t27, t28, t29]
80181
+ if ($2[46] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80182
+ t30 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", {
80183
+ className: "mt-2 text-muted-foreground text-xs",
80184
+ children: "You can also enable it now without review."
80144
80185
  });
80145
- $2[44] = t27;
80146
- $2[45] = t28;
80147
80186
  $2[46] = t30;
80148
80187
  } else {
80149
80188
  t30 = $2[46];
80150
80189
  }
80151
80190
  let t31;
80152
- if ($2[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80153
- t31 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogObject.Close, {
80191
+ if ($2[47] !== t28 || $2[48] !== t29) {
80192
+ t31 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogObject.Body, {
80193
+ children: [t28, t29, t30]
80194
+ });
80195
+ $2[47] = t28;
80196
+ $2[48] = t29;
80197
+ $2[49] = t31;
80198
+ } else {
80199
+ t31 = $2[49];
80200
+ }
80201
+ let t32;
80202
+ if ($2[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
80203
+ t32 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogObject.Close, {
80154
80204
  asChild: true,
80155
80205
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, {
80156
80206
  size: "sm",
@@ -80158,75 +80208,92 @@ var PluginCard = (t0) => {
80158
80208
  children: "Cancel"
80159
80209
  })
80160
80210
  });
80161
- $2[47] = t31;
80211
+ $2[50] = t32;
80162
80212
  } else {
80163
- t31 = $2[47];
80213
+ t32 = $2[50];
80164
80214
  }
80165
- let t32;
80166
- if ($2[48] !== handleEnableAnyway) {
80167
- t32 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogObject.Footer, {
80168
- children: [t31, /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, {
80215
+ let t33;
80216
+ if ($2[51] !== handleEnableAnyway) {
80217
+ t33 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogObject.Footer, {
80218
+ children: [t32, /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, {
80169
80219
  size: "sm",
80170
80220
  onClick: handleEnableAnyway,
80171
80221
  children: "Enable Anyway"
80172
80222
  })]
80173
80223
  });
80174
- $2[48] = handleEnableAnyway;
80175
- $2[49] = t32;
80176
- } else {
80177
- t32 = $2[49];
80178
- }
80179
- let t33;
80180
- if ($2[50] !== t30 || $2[51] !== t32) {
80181
- t33 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogObject.Content, {
80182
- onInteractOutside: _temp35,
80183
- children: [t26, t30, t32]
80184
- });
80185
- $2[50] = t30;
80186
- $2[51] = t32;
80224
+ $2[51] = handleEnableAnyway;
80187
80225
  $2[52] = t33;
80188
80226
  } else {
80189
80227
  t33 = $2[52];
80190
80228
  }
80191
80229
  let t34;
80192
- if ($2[53] !== t24 || $2[54] !== t33) {
80193
- t34 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogObject, {
80194
- open: t24,
80195
- onOpenChange: t25,
80196
- children: t33
80230
+ if ($2[53] !== t31 || $2[54] !== t33) {
80231
+ t34 = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(DialogObject.Content, {
80232
+ onInteractOutside: _temp35,
80233
+ children: [t27, t31, t33]
80197
80234
  });
80198
- $2[53] = t24;
80235
+ $2[53] = t31;
80199
80236
  $2[54] = t33;
80200
80237
  $2[55] = t34;
80201
80238
  } else {
80202
80239
  t34 = $2[55];
80203
80240
  }
80241
+ let t35;
80242
+ if ($2[56] !== t25 || $2[57] !== t34) {
80243
+ t35 = /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DialogObject, {
80244
+ open: t25,
80245
+ onOpenChange: t26,
80246
+ children: t34
80247
+ });
80248
+ $2[56] = t25;
80249
+ $2[57] = t34;
80250
+ $2[58] = t35;
80251
+ } else {
80252
+ t35 = $2[58];
80253
+ }
80204
80254
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(AccordionComponent.Item, {
80205
80255
  value: plugin.name,
80206
80256
  className: transitionClass ?? (removingPlugin ? "pointer-events-none opacity-60 transition-opacity" : inactive ? "opacity-70 transition-opacity" : void 0),
80207
80257
  children: [/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Header, {
80208
80258
  className: "flex",
80209
- children: [/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Trigger2, {
80210
- className: "focus-ring flex min-w-0 flex-1 cursor-pointer items-center gap-2 px-3 py-2 [&[data-state=open]>svg]:rotate-180",
80211
- children: [/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(TooltipObject, {
80212
- children: [/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TooltipObject.Trigger, {
80213
- asChild: true,
80214
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {
80215
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PluginIcon, {
80216
- pluginName: plugin.name,
80217
- displayName: plugin.displayName,
80218
- tabState: plugin.tabState,
80219
- size: 32,
80220
- iconSvg: plugin.iconSvg,
80221
- iconInactiveSvg: plugin.iconInactiveSvg,
80222
- iconDarkSvg: plugin.iconDarkSvg,
80223
- iconDarkInactiveSvg: plugin.iconDarkInactiveSvg,
80224
- active: hasActiveTool
80225
- })
80259
+ children: [tooltipText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(TooltipObject, {
80260
+ children: [/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TooltipObject.Trigger, {
80261
+ asChild: true,
80262
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("button", {
80263
+ type: "button",
80264
+ className: "focus-ring flex shrink-0 cursor-pointer items-center py-2 pl-3",
80265
+ onClick: handleOpenTab,
80266
+ "aria-label": tooltipText,
80267
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PluginIcon, {
80268
+ pluginName: plugin.name,
80269
+ displayName: plugin.displayName,
80270
+ tabState: plugin.tabState,
80271
+ size: 32,
80272
+ iconSvg: plugin.iconSvg,
80273
+ iconInactiveSvg: plugin.iconInactiveSvg,
80274
+ iconDarkSvg: plugin.iconDarkSvg,
80275
+ iconDarkInactiveSvg: plugin.iconDarkInactiveSvg,
80276
+ active: hasActiveTool,
80277
+ className: "transition-transform hover:scale-105"
80226
80278
  })
80227
- }), t5]
80228
- }), t9, t11]
80229
- }), t16, /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {
80279
+ })
80280
+ }), /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TooltipObject.Content, {
80281
+ children: tooltipText
80282
+ })]
80283
+ }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {
80284
+ className: "flex shrink-0 items-center py-2 pl-3",
80285
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PluginIcon, {
80286
+ pluginName: plugin.name,
80287
+ displayName: plugin.displayName,
80288
+ tabState: plugin.tabState,
80289
+ size: 32,
80290
+ iconSvg: plugin.iconSvg,
80291
+ iconInactiveSvg: plugin.iconInactiveSvg,
80292
+ iconDarkSvg: plugin.iconDarkSvg,
80293
+ iconDarkInactiveSvg: plugin.iconDarkInactiveSvg,
80294
+ active: hasActiveTool
80295
+ })
80296
+ }), t12, t17, /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", {
80230
80297
  className: "flex shrink-0 items-center px-3",
80231
80298
  children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PermissionSelect, {
80232
80299
  value: plugin.permission,
@@ -80236,7 +80303,7 @@ var PluginCard = (t0) => {
80236
80303
  ariaLabel: `Permission for ${plugin.name} plugin`
80237
80304
  })
80238
80305
  })]
80239
- }), t17, t18, t23, t34]
80306
+ }), t18, t19, t24, t35]
80240
80307
  });
80241
80308
  };
80242
80309
  function _temp9() {