agentation 2.0.0 → 2.1.1
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/README.md +2 -2
- package/dist/index.js +38 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -10
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img src="
|
|
1
|
+
<img src="https://raw.githubusercontent.com/benjitaylor/agentation/main/package/logo.svg" alt="Agentation" width="50" />
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/agentation)
|
|
4
4
|
[](https://www.npmjs.com/package/agentation)
|
|
@@ -49,7 +49,7 @@ The toolbar appears in the bottom-right corner. Click to activate, then click an
|
|
|
49
49
|
| `onAnnotationUpdate` | `(annotation: Annotation) => void` | - | Called when an annotation is edited |
|
|
50
50
|
| `onAnnotationsClear` | `(annotations: Annotation[]) => void` | - | Called when all annotations are cleared |
|
|
51
51
|
| `onCopy` | `(markdown: string) => void` | - | Callback with markdown output when copy is clicked |
|
|
52
|
-
| `onSubmit` | `(output: string, annotations: Annotation[]) => void` | - | Called when "Send
|
|
52
|
+
| `onSubmit` | `(output: string, annotations: Annotation[]) => void` | - | Called when "Send Annotations" is clicked |
|
|
53
53
|
| `copyToClipboard` | `boolean` | `true` | Set to false to prevent writing to clipboard |
|
|
54
54
|
| `endpoint` | `string` | - | Server URL for Agent Sync (e.g., `"http://localhost:4747"`) |
|
|
55
55
|
| `sessionId` | `string` | - | Pre-existing session ID to join |
|
package/dist/index.js
CHANGED
|
@@ -2847,6 +2847,36 @@ function PageFeedbackToolbarCSS({
|
|
|
2847
2847
|
const interval = setInterval(checkHealth, 1e4);
|
|
2848
2848
|
return () => clearInterval(interval);
|
|
2849
2849
|
}, [endpoint, mounted]);
|
|
2850
|
+
(0, import_react2.useEffect)(() => {
|
|
2851
|
+
if (!endpoint || !mounted || !currentSessionId) return;
|
|
2852
|
+
const eventSource = new EventSource(
|
|
2853
|
+
`${endpoint}/sessions/${currentSessionId}/events`
|
|
2854
|
+
);
|
|
2855
|
+
const removedStatuses = ["resolved", "dismissed"];
|
|
2856
|
+
const handler = (e) => {
|
|
2857
|
+
try {
|
|
2858
|
+
const event = JSON.parse(e.data);
|
|
2859
|
+
if (removedStatuses.includes(event.payload?.status)) {
|
|
2860
|
+
const id = event.payload.id;
|
|
2861
|
+
setExitingMarkers((prev) => new Set(prev).add(id));
|
|
2862
|
+
setTimeout(() => {
|
|
2863
|
+
setAnnotations((prev) => prev.filter((a) => a.id !== id));
|
|
2864
|
+
setExitingMarkers((prev) => {
|
|
2865
|
+
const next = new Set(prev);
|
|
2866
|
+
next.delete(id);
|
|
2867
|
+
return next;
|
|
2868
|
+
});
|
|
2869
|
+
}, 150);
|
|
2870
|
+
}
|
|
2871
|
+
} catch {
|
|
2872
|
+
}
|
|
2873
|
+
};
|
|
2874
|
+
eventSource.addEventListener("annotation.updated", handler);
|
|
2875
|
+
return () => {
|
|
2876
|
+
eventSource.removeEventListener("annotation.updated", handler);
|
|
2877
|
+
eventSource.close();
|
|
2878
|
+
};
|
|
2879
|
+
}, [endpoint, mounted, currentSessionId]);
|
|
2850
2880
|
(0, import_react2.useEffect)(() => {
|
|
2851
2881
|
if (!endpoint || !mounted) return;
|
|
2852
2882
|
const wasDisconnected = prevConnectionStatusRef.current === "disconnected";
|
|
@@ -4112,6 +4142,12 @@ function PageFeedbackToolbarCSS({
|
|
|
4112
4142
|
setIsActive(false);
|
|
4113
4143
|
}
|
|
4114
4144
|
}
|
|
4145
|
+
if ((e.metaKey || e.ctrlKey) && e.shiftKey && (e.key === "f" || e.key === "F")) {
|
|
4146
|
+
e.preventDefault();
|
|
4147
|
+
hideTooltipsUntilMouseLeave();
|
|
4148
|
+
setIsActive((prev) => !prev);
|
|
4149
|
+
return;
|
|
4150
|
+
}
|
|
4115
4151
|
if (isTyping || e.metaKey || e.ctrlKey) return;
|
|
4116
4152
|
if (e.key === "p" || e.key === "P") {
|
|
4117
4153
|
e.preventDefault();
|
|
@@ -4466,7 +4502,7 @@ function PageFeedbackToolbarCSS({
|
|
|
4466
4502
|
] }),
|
|
4467
4503
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: styles_module_default2.settingsVersion, children: [
|
|
4468
4504
|
"v",
|
|
4469
|
-
"2.
|
|
4505
|
+
"2.1.1"
|
|
4470
4506
|
] }),
|
|
4471
4507
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4472
4508
|
"button",
|
|
@@ -4748,21 +4784,12 @@ function PageFeedbackToolbarCSS({
|
|
|
4748
4784
|
]
|
|
4749
4785
|
}
|
|
4750
4786
|
),
|
|
4751
|
-
endpoint
|
|
4787
|
+
endpoint && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4752
4788
|
"div",
|
|
4753
4789
|
{
|
|
4754
4790
|
className: `${styles_module_default2.mcpStatusDot} ${styles_module_default2[connectionStatus]}`,
|
|
4755
4791
|
title: connectionStatus === "connected" ? "Connected" : connectionStatus === "connecting" ? "Connecting..." : "Disconnected"
|
|
4756
4792
|
}
|
|
4757
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4758
|
-
"a",
|
|
4759
|
-
{
|
|
4760
|
-
href: "https://agentation.dev/install#mcp-server",
|
|
4761
|
-
target: "_blank",
|
|
4762
|
-
rel: "noopener noreferrer",
|
|
4763
|
-
className: styles_module_default2.settingsLink,
|
|
4764
|
-
children: "Learn more \u2192"
|
|
4765
|
-
}
|
|
4766
4793
|
)
|
|
4767
4794
|
] }),
|
|
4768
4795
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|