@hachej/boring-ask-user 0.1.34 → 0.1.35
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/front/index.js +14 -1
- package/package.json +5 -5
package/dist/front/index.js
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
import { Button, EmptyState, Notice, Pane, PaneBody, PaneFooter, PaneHeader, PaneTitle } from "@hachej/boring-ui-kit";
|
|
5
5
|
import {
|
|
6
6
|
UI_COMMAND_EVENT,
|
|
7
|
-
|
|
7
|
+
events,
|
|
8
|
+
useWorkspaceAttention,
|
|
9
|
+
workspaceEvents
|
|
8
10
|
} from "@hachej/boring-workspace";
|
|
9
11
|
import {
|
|
10
12
|
definePlugin
|
|
@@ -415,12 +417,23 @@ function AskUserProvider({ apiBaseUrl, authHeaders, children }) {
|
|
|
415
417
|
const onUiCommand = () => {
|
|
416
418
|
void refreshPending();
|
|
417
419
|
};
|
|
420
|
+
let agentDataTimer = null;
|
|
421
|
+
const onAgentData = () => {
|
|
422
|
+
if (agentDataTimer) return;
|
|
423
|
+
agentDataTimer = setTimeout(() => {
|
|
424
|
+
agentDataTimer = null;
|
|
425
|
+
void refreshPending();
|
|
426
|
+
}, 1200);
|
|
427
|
+
};
|
|
428
|
+
const offAgentData = events.on(workspaceEvents.agentData, onAgentData);
|
|
418
429
|
void refreshPending();
|
|
419
430
|
window.addEventListener("focus", refreshPending);
|
|
420
431
|
document.addEventListener("visibilitychange", onVisibility);
|
|
421
432
|
window.addEventListener(UI_COMMAND_EVENT, onUiCommand);
|
|
422
433
|
return () => {
|
|
423
434
|
stopped = true;
|
|
435
|
+
if (agentDataTimer) clearTimeout(agentDataTimer);
|
|
436
|
+
offAgentData();
|
|
424
437
|
window.removeEventListener("focus", refreshPending);
|
|
425
438
|
document.removeEventListener("visibilitychange", onVisibility);
|
|
426
439
|
window.removeEventListener(UI_COMMAND_EVENT, onUiCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-ask-user",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"fastify": "^5.3.3",
|
|
47
47
|
"react": "^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
49
|
-
"@hachej/boring-workspace": "0.1.
|
|
49
|
+
"@hachej/boring-workspace": "0.1.35"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"lucide-react": "^1.8.0",
|
|
53
53
|
"zod": "^3.23.0",
|
|
54
|
-
"@hachej/boring-ui-kit": "0.1.
|
|
54
|
+
"@hachej/boring-ui-kit": "0.1.35"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"react-dom": "^19.0.0",
|
|
67
67
|
"tsup": "^8.4.0",
|
|
68
68
|
"typescript": "~5.9.3",
|
|
69
|
-
"vitest": "^3.
|
|
70
|
-
"@hachej/boring-workspace": "0.1.
|
|
69
|
+
"vitest": "^3.2.6",
|
|
70
|
+
"@hachej/boring-workspace": "0.1.35"
|
|
71
71
|
},
|
|
72
72
|
"peerDependenciesMeta": {
|
|
73
73
|
"fastify": {
|