agentation 2.1.0 → 2.2.0

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.mjs CHANGED
@@ -966,6 +966,181 @@ var AnimatedBunny = ({
966
966
  }
967
967
  );
968
968
 
969
+ // src/utils/freeze-animations.ts
970
+ var EXCLUDE_ATTRS = [
971
+ "data-feedback-toolbar",
972
+ "data-annotation-popup",
973
+ "data-annotation-marker"
974
+ ];
975
+ var NOT_SELECTORS = EXCLUDE_ATTRS.flatMap((a) => [`:not([${a}])`, `:not([${a}] *)`]).join("");
976
+ var STYLE_ID = "feedback-freeze-styles";
977
+ var STATE_KEY = "__agentation_freeze";
978
+ function getState() {
979
+ if (typeof window === "undefined") {
980
+ return {
981
+ frozen: false,
982
+ installed: true,
983
+ // prevent patching on server
984
+ origSetTimeout: setTimeout,
985
+ origSetInterval: setInterval,
986
+ origRAF: (cb) => 0,
987
+ pausedAnimations: [],
988
+ frozenTimeoutQueue: [],
989
+ frozenRAFQueue: []
990
+ };
991
+ }
992
+ const w = window;
993
+ if (!w[STATE_KEY]) {
994
+ w[STATE_KEY] = {
995
+ frozen: false,
996
+ installed: false,
997
+ origSetTimeout: null,
998
+ origSetInterval: null,
999
+ origRAF: null,
1000
+ pausedAnimations: [],
1001
+ frozenTimeoutQueue: [],
1002
+ frozenRAFQueue: []
1003
+ };
1004
+ }
1005
+ return w[STATE_KEY];
1006
+ }
1007
+ var _s = getState();
1008
+ if (typeof window !== "undefined" && !_s.installed) {
1009
+ _s.origSetTimeout = window.setTimeout.bind(window);
1010
+ _s.origSetInterval = window.setInterval.bind(window);
1011
+ _s.origRAF = window.requestAnimationFrame.bind(window);
1012
+ window.setTimeout = (handler, timeout, ...args) => {
1013
+ if (typeof handler === "string") {
1014
+ return _s.origSetTimeout(handler, timeout);
1015
+ }
1016
+ return _s.origSetTimeout(
1017
+ (...a) => {
1018
+ if (_s.frozen) {
1019
+ _s.frozenTimeoutQueue.push(() => handler(...a));
1020
+ } else {
1021
+ handler(...a);
1022
+ }
1023
+ },
1024
+ timeout,
1025
+ ...args
1026
+ );
1027
+ };
1028
+ window.setInterval = (handler, timeout, ...args) => {
1029
+ if (typeof handler === "string") {
1030
+ return _s.origSetInterval(handler, timeout);
1031
+ }
1032
+ return _s.origSetInterval(
1033
+ (...a) => {
1034
+ if (!_s.frozen) handler(...a);
1035
+ },
1036
+ timeout,
1037
+ ...args
1038
+ );
1039
+ };
1040
+ window.requestAnimationFrame = (callback) => {
1041
+ return _s.origRAF((timestamp) => {
1042
+ if (_s.frozen) {
1043
+ _s.frozenRAFQueue.push(callback);
1044
+ } else {
1045
+ callback(timestamp);
1046
+ }
1047
+ });
1048
+ };
1049
+ _s.installed = true;
1050
+ }
1051
+ var originalSetTimeout = _s.origSetTimeout;
1052
+ var originalSetInterval = _s.origSetInterval;
1053
+ function isAgentationElement(el) {
1054
+ if (!el) return false;
1055
+ return EXCLUDE_ATTRS.some((attr) => !!el.closest?.(`[${attr}]`));
1056
+ }
1057
+ function freeze() {
1058
+ if (typeof document === "undefined") return;
1059
+ if (_s.frozen) return;
1060
+ _s.frozen = true;
1061
+ _s.frozenTimeoutQueue = [];
1062
+ _s.frozenRAFQueue = [];
1063
+ let style = document.getElementById(STYLE_ID);
1064
+ if (!style) {
1065
+ style = document.createElement("style");
1066
+ style.id = STYLE_ID;
1067
+ }
1068
+ style.textContent = `
1069
+ *${NOT_SELECTORS},
1070
+ *${NOT_SELECTORS}::before,
1071
+ *${NOT_SELECTORS}::after {
1072
+ animation-play-state: paused !important;
1073
+ transition: none !important;
1074
+ }
1075
+ `;
1076
+ document.head.appendChild(style);
1077
+ _s.pausedAnimations = [];
1078
+ try {
1079
+ document.getAnimations().forEach((anim) => {
1080
+ if (anim.playState !== "running") return;
1081
+ const target = anim.effect?.target;
1082
+ if (!isAgentationElement(target)) {
1083
+ anim.pause();
1084
+ _s.pausedAnimations.push(anim);
1085
+ }
1086
+ });
1087
+ } catch {
1088
+ }
1089
+ document.querySelectorAll("video").forEach((video) => {
1090
+ if (!video.paused) {
1091
+ video.dataset.wasPaused = "false";
1092
+ video.pause();
1093
+ }
1094
+ });
1095
+ }
1096
+ function unfreeze() {
1097
+ if (typeof document === "undefined") return;
1098
+ if (!_s.frozen) return;
1099
+ _s.frozen = false;
1100
+ const timeoutQueue = _s.frozenTimeoutQueue;
1101
+ _s.frozenTimeoutQueue = [];
1102
+ for (const cb of timeoutQueue) {
1103
+ _s.origSetTimeout(() => {
1104
+ if (_s.frozen) {
1105
+ _s.frozenTimeoutQueue.push(cb);
1106
+ return;
1107
+ }
1108
+ try {
1109
+ cb();
1110
+ } catch (e) {
1111
+ console.warn("[agentation] Error replaying queued timeout:", e);
1112
+ }
1113
+ }, 0);
1114
+ }
1115
+ const rafQueue = _s.frozenRAFQueue;
1116
+ _s.frozenRAFQueue = [];
1117
+ for (const cb of rafQueue) {
1118
+ _s.origRAF((ts) => {
1119
+ if (_s.frozen) {
1120
+ _s.frozenRAFQueue.push(cb);
1121
+ return;
1122
+ }
1123
+ cb(ts);
1124
+ });
1125
+ }
1126
+ for (const anim of _s.pausedAnimations) {
1127
+ try {
1128
+ anim.play();
1129
+ } catch (e) {
1130
+ console.warn("[agentation] Error resuming animation:", e);
1131
+ }
1132
+ }
1133
+ _s.pausedAnimations = [];
1134
+ document.getElementById(STYLE_ID)?.remove();
1135
+ document.querySelectorAll("video").forEach((video) => {
1136
+ if (video.dataset.wasPaused === "false") {
1137
+ video.play().catch(() => {
1138
+ });
1139
+ delete video.dataset.wasPaused;
1140
+ }
1141
+ });
1142
+ }
1143
+
969
1144
  // src/components/annotation-popup-css/index.tsx
970
1145
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
971
1146
  var AnnotationPopupCSS = forwardRef(
@@ -992,19 +1167,21 @@ var AnnotationPopupCSS = forwardRef(
992
1167
  const [isStylesExpanded, setIsStylesExpanded] = useState(false);
993
1168
  const textareaRef = useRef(null);
994
1169
  const popupRef = useRef(null);
1170
+ const cancelTimerRef = useRef(null);
1171
+ const shakeTimerRef = useRef(null);
995
1172
  useEffect(() => {
996
1173
  if (isExiting && animState !== "exit") {
997
1174
  setAnimState("exit");
998
1175
  }
999
1176
  }, [isExiting, animState]);
1000
1177
  useEffect(() => {
1001
- requestAnimationFrame(() => {
1178
+ originalSetTimeout(() => {
1002
1179
  setAnimState("enter");
1003
- });
1004
- const enterTimer = setTimeout(() => {
1180
+ }, 0);
1181
+ const enterTimer = originalSetTimeout(() => {
1005
1182
  setAnimState("entered");
1006
1183
  }, 200);
1007
- const focusTimer = setTimeout(() => {
1184
+ const focusTimer = originalSetTimeout(() => {
1008
1185
  const textarea = textareaRef.current;
1009
1186
  if (textarea) {
1010
1187
  textarea.focus();
@@ -1015,11 +1192,14 @@ var AnnotationPopupCSS = forwardRef(
1015
1192
  return () => {
1016
1193
  clearTimeout(enterTimer);
1017
1194
  clearTimeout(focusTimer);
1195
+ if (cancelTimerRef.current) clearTimeout(cancelTimerRef.current);
1196
+ if (shakeTimerRef.current) clearTimeout(shakeTimerRef.current);
1018
1197
  };
1019
1198
  }, []);
1020
1199
  const shake = useCallback(() => {
1200
+ if (shakeTimerRef.current) clearTimeout(shakeTimerRef.current);
1021
1201
  setIsShaking(true);
1022
- setTimeout(() => {
1202
+ shakeTimerRef.current = originalSetTimeout(() => {
1023
1203
  setIsShaking(false);
1024
1204
  textareaRef.current?.focus();
1025
1205
  }, 250);
@@ -1029,7 +1209,7 @@ var AnnotationPopupCSS = forwardRef(
1029
1209
  }), [shake]);
1030
1210
  const handleCancel = useCallback(() => {
1031
1211
  setAnimState("exit");
1032
- setTimeout(() => {
1212
+ cancelTimerRef.current = originalSetTimeout(() => {
1033
1213
  onCancel();
1034
1214
  }, 150);
1035
1215
  }, [onCancel]);
@@ -1076,7 +1256,7 @@ var AnnotationPopupCSS = forwardRef(
1076
1256
  const wasExpanded = isStylesExpanded;
1077
1257
  setIsStylesExpanded(!isStylesExpanded);
1078
1258
  if (wasExpanded) {
1079
- setTimeout(() => textareaRef.current?.focus(), 0);
1259
+ originalSetTimeout(() => textareaRef.current?.focus(), 0);
1080
1260
  }
1081
1261
  },
1082
1262
  type: "button",
@@ -2411,7 +2591,7 @@ function PageFeedbackToolbarCSS({
2411
2591
  exitTimeoutRef.current = null;
2412
2592
  }
2413
2593
  updatePosition();
2414
- timeoutRef.current = setTimeout(() => {
2594
+ timeoutRef.current = originalSetTimeout(() => {
2415
2595
  setVisible(true);
2416
2596
  }, 500);
2417
2597
  };
@@ -2422,7 +2602,7 @@ function PageFeedbackToolbarCSS({
2422
2602
  timeoutRef.current = null;
2423
2603
  }
2424
2604
  setVisible(false);
2425
- exitTimeoutRef.current = setTimeout(() => {
2605
+ exitTimeoutRef.current = originalSetTimeout(() => {
2426
2606
  setShouldRender(false);
2427
2607
  }, 150);
2428
2608
  };
@@ -2446,6 +2626,7 @@ function PageFeedbackToolbarCSS({
2446
2626
  /* @__PURE__ */ jsx3(
2447
2627
  "div",
2448
2628
  {
2629
+ "data-feedback-toolbar": true,
2449
2630
  style: {
2450
2631
  position: "fixed",
2451
2632
  top: position.top,
@@ -2515,13 +2696,13 @@ function PageFeedbackToolbarCSS({
2515
2696
  } else {
2516
2697
  setTooltipsHidden(false);
2517
2698
  setSettingsPage("main");
2518
- const timer = setTimeout(() => setShowSettingsVisible(false), 0);
2699
+ const timer = originalSetTimeout(() => setShowSettingsVisible(false), 0);
2519
2700
  return () => clearTimeout(timer);
2520
2701
  }
2521
2702
  }, [showSettings]);
2522
2703
  useEffect2(() => {
2523
2704
  setIsTransitioning(true);
2524
- const timer = setTimeout(() => setIsTransitioning(false), 350);
2705
+ const timer = originalSetTimeout(() => setIsTransitioning(false), 350);
2525
2706
  return () => clearTimeout(timer);
2526
2707
  }, [settingsPage]);
2527
2708
  const shouldShowMarkers = isActive && showMarkers;
@@ -2530,7 +2711,7 @@ function PageFeedbackToolbarCSS({
2530
2711
  setMarkersExiting(false);
2531
2712
  setMarkersVisible(true);
2532
2713
  setAnimatedMarkers(/* @__PURE__ */ new Set());
2533
- const timer = setTimeout(() => {
2714
+ const timer = originalSetTimeout(() => {
2534
2715
  setAnimatedMarkers((prev) => {
2535
2716
  const newSet = new Set(prev);
2536
2717
  annotations.forEach((a) => newSet.add(a.id));
@@ -2540,7 +2721,7 @@ function PageFeedbackToolbarCSS({
2540
2721
  return () => clearTimeout(timer);
2541
2722
  } else if (markersVisible) {
2542
2723
  setMarkersExiting(true);
2543
- const timer = setTimeout(() => {
2724
+ const timer = originalSetTimeout(() => {
2544
2725
  setMarkersVisible(false);
2545
2726
  setMarkersExiting(false);
2546
2727
  }, 250);
@@ -2555,7 +2736,7 @@ function PageFeedbackToolbarCSS({
2555
2736
  if (!hasPlayedEntranceAnimation) {
2556
2737
  setShowEntranceAnimation(true);
2557
2738
  hasPlayedEntranceAnimation = true;
2558
- setTimeout(() => setShowEntranceAnimation(false), 750);
2739
+ originalSetTimeout(() => setShowEntranceAnimation(false), 750);
2559
2740
  }
2560
2741
  try {
2561
2742
  const storedSettings = localStorage.getItem("feedback-toolbar-settings");
@@ -2771,7 +2952,7 @@ function PageFeedbackToolbarCSS({
2771
2952
  }
2772
2953
  };
2773
2954
  checkHealth();
2774
- const interval = setInterval(checkHealth, 1e4);
2955
+ const interval = originalSetInterval(checkHealth, 1e4);
2775
2956
  return () => clearInterval(interval);
2776
2957
  }, [endpoint, mounted]);
2777
2958
  useEffect2(() => {
@@ -2786,7 +2967,7 @@ function PageFeedbackToolbarCSS({
2786
2967
  if (removedStatuses.includes(event.payload?.status)) {
2787
2968
  const id = event.payload.id;
2788
2969
  setExitingMarkers((prev) => new Set(prev).add(id));
2789
- setTimeout(() => {
2970
+ originalSetTimeout(() => {
2790
2971
  setAnnotations((prev) => prev.filter((a) => a.id !== id));
2791
2972
  setExitingMarkers((prev) => {
2792
2973
  const next = new Set(prev);
@@ -2868,14 +3049,14 @@ function PageFeedbackToolbarCSS({
2868
3049
  if (annotations.length > 0) return;
2869
3050
  const timeoutIds = [];
2870
3051
  timeoutIds.push(
2871
- setTimeout(() => {
3052
+ originalSetTimeout(() => {
2872
3053
  setIsActive(true);
2873
3054
  }, demoDelay - 200)
2874
3055
  );
2875
3056
  demoAnnotations.forEach((demo, index) => {
2876
3057
  const annotationDelay = demoDelay + index * 300;
2877
3058
  timeoutIds.push(
2878
- setTimeout(() => {
3059
+ originalSetTimeout(() => {
2879
3060
  const element = document.querySelector(demo.selector);
2880
3061
  if (!element) return;
2881
3062
  const rect = element.getBoundingClientRect();
@@ -2913,7 +3094,7 @@ function PageFeedbackToolbarCSS({
2913
3094
  if (scrollTimeoutRef.current) {
2914
3095
  clearTimeout(scrollTimeoutRef.current);
2915
3096
  }
2916
- scrollTimeoutRef.current = setTimeout(() => {
3097
+ scrollTimeoutRef.current = originalSetTimeout(() => {
2917
3098
  setIsScrolling(false);
2918
3099
  }, 150);
2919
3100
  };
@@ -2938,35 +3119,12 @@ function PageFeedbackToolbarCSS({
2938
3119
  }, [annotations, pathname, mounted, currentSessionId]);
2939
3120
  const freezeAnimations = useCallback2(() => {
2940
3121
  if (isFrozen) return;
2941
- const style = document.createElement("style");
2942
- style.id = "feedback-freeze-styles";
2943
- style.textContent = `
2944
- *:not([data-feedback-toolbar]):not([data-feedback-toolbar] *):not([data-annotation-popup]):not([data-annotation-popup] *):not([data-annotation-marker]):not([data-annotation-marker] *),
2945
- *:not([data-feedback-toolbar]):not([data-feedback-toolbar] *):not([data-annotation-popup]):not([data-annotation-popup] *):not([data-annotation-marker]):not([data-annotation-marker] *)::before,
2946
- *:not([data-feedback-toolbar]):not([data-feedback-toolbar] *):not([data-annotation-popup]):not([data-annotation-popup] *):not([data-annotation-marker]):not([data-annotation-marker] *)::after {
2947
- animation-play-state: paused !important;
2948
- transition: none !important;
2949
- }
2950
- `;
2951
- document.head.appendChild(style);
2952
- document.querySelectorAll("video").forEach((video) => {
2953
- if (!video.paused) {
2954
- video.dataset.wasPaused = "false";
2955
- video.pause();
2956
- }
2957
- });
3122
+ freeze();
2958
3123
  setIsFrozen(true);
2959
3124
  }, [isFrozen]);
2960
3125
  const unfreezeAnimations = useCallback2(() => {
2961
3126
  if (!isFrozen) return;
2962
- const style = document.getElementById("feedback-freeze-styles");
2963
- if (style) style.remove();
2964
- document.querySelectorAll("video").forEach((video) => {
2965
- if (video.dataset.wasPaused === "false") {
2966
- video.play();
2967
- delete video.dataset.wasPaused;
2968
- }
2969
- });
3127
+ unfreeze();
2970
3128
  setIsFrozen(false);
2971
3129
  }, [isFrozen]);
2972
3130
  const toggleFreeze = useCallback2(() => {
@@ -3075,6 +3233,11 @@ function PageFeedbackToolbarCSS({
3075
3233
  }
3076
3234
  }
3077
3235
  }, [isActive, isFrozen, unfreezeAnimations]);
3236
+ useEffect2(() => {
3237
+ return () => {
3238
+ unfreeze();
3239
+ };
3240
+ }, []);
3078
3241
  useEffect2(() => {
3079
3242
  if (!isActive) return;
3080
3243
  const style = document.createElement("style");
@@ -3660,16 +3823,16 @@ function PageFeedbackToolbarCSS({
3660
3823
  };
3661
3824
  setAnnotations((prev) => [...prev, newAnnotation]);
3662
3825
  recentlyAddedIdRef.current = newAnnotation.id;
3663
- setTimeout(() => {
3826
+ originalSetTimeout(() => {
3664
3827
  recentlyAddedIdRef.current = null;
3665
3828
  }, 300);
3666
- setTimeout(() => {
3829
+ originalSetTimeout(() => {
3667
3830
  setAnimatedMarkers((prev) => new Set(prev).add(newAnnotation.id));
3668
3831
  }, 250);
3669
3832
  onAnnotationAdd?.(newAnnotation);
3670
3833
  fireWebhook("annotation.add", { annotation: newAnnotation });
3671
3834
  setPendingExiting(true);
3672
- setTimeout(() => {
3835
+ originalSetTimeout(() => {
3673
3836
  setPendingAnnotation(null);
3674
3837
  setPendingExiting(false);
3675
3838
  }, 150);
@@ -3704,7 +3867,7 @@ function PageFeedbackToolbarCSS({
3704
3867
  );
3705
3868
  const cancelAnnotation = useCallback2(() => {
3706
3869
  setPendingExiting(true);
3707
- setTimeout(() => {
3870
+ originalSetTimeout(() => {
3708
3871
  setPendingAnnotation(null);
3709
3872
  setPendingExiting(false);
3710
3873
  }, 150);
@@ -3715,7 +3878,7 @@ function PageFeedbackToolbarCSS({
3715
3878
  const deletedAnnotation = annotations[deletedIndex];
3716
3879
  if (editingAnnotation?.id === id) {
3717
3880
  setEditExiting(true);
3718
- setTimeout(() => {
3881
+ originalSetTimeout(() => {
3719
3882
  setEditingAnnotation(null);
3720
3883
  setEditingTargetElement(null);
3721
3884
  setEditingTargetElements([]);
@@ -3736,7 +3899,7 @@ function PageFeedbackToolbarCSS({
3736
3899
  );
3737
3900
  });
3738
3901
  }
3739
- setTimeout(() => {
3902
+ originalSetTimeout(() => {
3740
3903
  setAnnotations((prev) => prev.filter((a) => a.id !== id));
3741
3904
  setExitingMarkers((prev) => {
3742
3905
  const next = new Set(prev);
@@ -3746,7 +3909,7 @@ function PageFeedbackToolbarCSS({
3746
3909
  setDeletingMarkerId(null);
3747
3910
  if (deletedIndex < annotations.length - 1) {
3748
3911
  setRenumberFrom(deletedIndex);
3749
- setTimeout(() => setRenumberFrom(null), 200);
3912
+ originalSetTimeout(() => setRenumberFrom(null), 200);
3750
3913
  }
3751
3914
  }, 150);
3752
3915
  },
@@ -3859,7 +4022,7 @@ function PageFeedbackToolbarCSS({
3859
4022
  });
3860
4023
  }
3861
4024
  setEditExiting(true);
3862
- setTimeout(() => {
4025
+ originalSetTimeout(() => {
3863
4026
  setEditingAnnotation(null);
3864
4027
  setEditingTargetElement(null);
3865
4028
  setEditingTargetElements([]);
@@ -3870,7 +4033,7 @@ function PageFeedbackToolbarCSS({
3870
4033
  );
3871
4034
  const cancelEditAnnotation = useCallback2(() => {
3872
4035
  setEditExiting(true);
3873
- setTimeout(() => {
4036
+ originalSetTimeout(() => {
3874
4037
  setEditingAnnotation(null);
3875
4038
  setEditingTargetElement(null);
3876
4039
  setEditingTargetElements([]);
@@ -3897,13 +4060,13 @@ function PageFeedbackToolbarCSS({
3897
4060
  setIsClearing(true);
3898
4061
  setCleared(true);
3899
4062
  const totalAnimationTime = count * 30 + 200;
3900
- setTimeout(() => {
4063
+ originalSetTimeout(() => {
3901
4064
  setAnnotations([]);
3902
4065
  setAnimatedMarkers(/* @__PURE__ */ new Set());
3903
4066
  localStorage.removeItem(getStorageKey(pathname));
3904
4067
  setIsClearing(false);
3905
4068
  }, totalAnimationTime);
3906
- setTimeout(() => setCleared(false), 1500);
4069
+ originalSetTimeout(() => setCleared(false), 1500);
3907
4070
  }, [pathname, annotations, onAnnotationsClear, fireWebhook, endpoint]);
3908
4071
  const copyOutput = useCallback2(async () => {
3909
4072
  const displayUrl = typeof window !== "undefined" ? window.location.pathname + window.location.search + window.location.hash : pathname;
@@ -3922,9 +4085,9 @@ function PageFeedbackToolbarCSS({
3922
4085
  }
3923
4086
  onCopy?.(output);
3924
4087
  setCopied(true);
3925
- setTimeout(() => setCopied(false), 2e3);
4088
+ originalSetTimeout(() => setCopied(false), 2e3);
3926
4089
  if (settings.autoClearAfterCopy) {
3927
- setTimeout(() => clearAll(), 500);
4090
+ originalSetTimeout(() => clearAll(), 500);
3928
4091
  }
3929
4092
  }, [
3930
4093
  annotations,
@@ -3949,12 +4112,12 @@ function PageFeedbackToolbarCSS({
3949
4112
  onSubmit(output, annotations);
3950
4113
  }
3951
4114
  setSendState("sending");
3952
- await new Promise((resolve) => setTimeout(resolve, 150));
4115
+ await new Promise((resolve) => originalSetTimeout(resolve, 150));
3953
4116
  const success = await fireWebhook("submit", { output, annotations }, true);
3954
4117
  setSendState(success ? "sent" : "failed");
3955
- setTimeout(() => setSendState("idle"), 2500);
4118
+ originalSetTimeout(() => setSendState("idle"), 2500);
3956
4119
  if (success && settings.autoClearAfterCopy) {
3957
- setTimeout(() => clearAll(), 500);
4120
+ originalSetTimeout(() => clearAll(), 500);
3958
4121
  }
3959
4122
  }, [
3960
4123
  onSubmit,
@@ -4429,7 +4592,7 @@ function PageFeedbackToolbarCSS({
4429
4592
  ] }),
4430
4593
  /* @__PURE__ */ jsxs3("span", { className: styles_module_default2.settingsVersion, children: [
4431
4594
  "v",
4432
- "2.1.0"
4595
+ "2.2.0"
4433
4596
  ] }),
4434
4597
  /* @__PURE__ */ jsx3(
4435
4598
  "button",
@@ -4711,21 +4874,12 @@ function PageFeedbackToolbarCSS({
4711
4874
  ]
4712
4875
  }
4713
4876
  ),
4714
- endpoint ? /* @__PURE__ */ jsx3(
4877
+ endpoint && /* @__PURE__ */ jsx3(
4715
4878
  "div",
4716
4879
  {
4717
4880
  className: `${styles_module_default2.mcpStatusDot} ${styles_module_default2[connectionStatus]}`,
4718
4881
  title: connectionStatus === "connected" ? "Connected" : connectionStatus === "connecting" ? "Connecting..." : "Disconnected"
4719
4882
  }
4720
- ) : /* @__PURE__ */ jsx3(
4721
- "a",
4722
- {
4723
- href: "https://agentation.dev/install#mcp-server",
4724
- target: "_blank",
4725
- rel: "noopener noreferrer",
4726
- className: styles_module_default2.settingsLink,
4727
- children: "Learn more \u2192"
4728
- }
4729
4883
  )
4730
4884
  ] }),
4731
4885
  /* @__PURE__ */ jsxs3(