@agent-native/core 0.84.21 → 0.84.22
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +8 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/AssistantChat.tsx +27 -4
- package/corpus/core/src/client/guided-questions.tsx +11 -6
- package/corpus/core/src/client/tool-display.ts +8 -0
- package/corpus/core/src/file-upload/builder.ts +7 -2
- package/corpus/core/src/notifications/channels.ts +235 -38
- package/corpus/core/src/server/analytics.ts +32 -6
- package/corpus/core/src/server/ssr-handler.ts +31 -12
- package/corpus/templates/analytics/AGENTS.md +21 -0
- package/corpus/templates/analytics/README.md +35 -0
- package/corpus/templates/analytics/actions/delete-analytics-alert-rule.ts +23 -0
- package/corpus/templates/analytics/actions/list-analytics-alert-rules.ts +20 -0
- package/corpus/templates/analytics/actions/run-analytics-alerts.ts +23 -0
- package/corpus/templates/analytics/actions/save-analytics-alert-rule.ts +69 -0
- package/corpus/templates/analytics/changelog/2026-07-01-analytics-can-alert-when-first-party-events-spike.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-01-session-replays-play-back-in-production-instead-of-showing.md +6 -0
- package/corpus/templates/analytics/netlify.toml +3 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +109 -0
- package/corpus/templates/analytics/server/db/schema.ts +55 -0
- package/corpus/templates/analytics/server/handlers/session-replay.ts +5 -2
- package/corpus/templates/analytics/server/jobs/analytics-alerts.ts +71 -0
- package/corpus/templates/analytics/server/lib/analytics-alerts.ts +734 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +10 -3
- package/corpus/templates/analytics/server/plugins/analytics-alert-jobs.ts +54 -0
- package/corpus/templates/analytics/server/plugins/db.ts +100 -0
- package/corpus/templates/analytics/server/routes/api/analytics-alerts/run.post.ts +60 -0
- package/corpus/templates/assets/README.md +30 -8
- package/corpus/templates/brain/README.md +20 -552
- package/corpus/templates/calendar/README.md +22 -28
- package/corpus/templates/chat/README.md +32 -0
- package/corpus/templates/clips/README.md +37 -0
- package/corpus/templates/clips/app/components/library/library-grid.tsx +18 -7
- package/corpus/templates/clips/app/components/library/recording-card.tsx +42 -5
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +41 -1
- package/corpus/templates/clips/changelog/2026-07-01-move-to-folder-now-opens-folder-choices-directly-instead-of.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
- package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +37 -0
- package/corpus/templates/content/AGENTS.md +7 -3
- package/corpus/templates/content/README.md +22 -34
- package/corpus/templates/content/actions/list-trashed-content-databases.ts +4 -0
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +58 -6
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +257 -24
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +41 -15
- package/corpus/templates/content/app/i18n/zh-TW.ts +25 -7
- package/corpus/templates/content/app/i18n-data.ts +278 -40
- package/corpus/templates/content/changelog/2026-06-30-database-once-again-creates-an-inline-database-in-the-curren.md +6 -0
- package/corpus/templates/content/shared/api.ts +1 -0
- package/corpus/templates/design/AGENTS.md +7 -6
- package/corpus/templates/design/README.md +33 -0
- package/corpus/templates/design/actions/delete-file.ts +86 -10
- package/corpus/templates/design/actions/get-design-snapshot.ts +13 -0
- package/corpus/templates/design/actions/present-design-variants.ts +11 -13
- package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
- package/corpus/templates/design/app/pages/DesignEditor.tsx +2 -2
- package/corpus/templates/dispatch/README.md +34 -0
- package/corpus/templates/forms/README.md +34 -0
- package/corpus/templates/macros/README.md +28 -0
- package/corpus/templates/mail/README.md +35 -0
- package/corpus/templates/plan/README.md +30 -118
- package/corpus/templates/slides/README.md +34 -0
- package/corpus/templates/videos/README.md +22 -201
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +28 -4
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +10 -6
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/tool-display.d.ts.map +1 -1
- package/dist/client/tool-display.js +8 -0
- package/dist/client/tool-display.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/builder.d.ts.map +1 -1
- package/dist/file-upload/builder.js +6 -2
- package/dist/file-upload/builder.js.map +1 -1
- package/dist/notifications/channels.d.ts +10 -0
- package/dist/notifications/channels.d.ts.map +1 -1
- package/dist/notifications/channels.js +172 -20
- package/dist/notifications/channels.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/analytics.d.ts +16 -0
- package/dist/server/analytics.d.ts.map +1 -1
- package/dist/server/analytics.js +30 -7
- package/dist/server/analytics.js.map +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +28 -12
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,212 +1,33 @@
|
|
|
1
|
-
# Video
|
|
1
|
+
# Video
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An agent-native, Remotion-based video composition studio. Describe a video in
|
|
4
|
+
plain English and the agent generates animated React compositions with camera
|
|
5
|
+
moves, interactive cursor animations, and a full timeline editor.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Live app: [videos.agent-native.com](https://videos.agent-native.com)**
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Open http://localhost:8080 to access the studio.
|
|
13
|
-
|
|
14
|
-
## ✨ Features
|
|
15
|
-
|
|
16
|
-
### 🎬 AI-Powered Generation
|
|
17
|
-
|
|
18
|
-
- Describe videos in natural language
|
|
19
|
-
- Attach reference images, logos, and assets
|
|
20
|
-
- Generates React components and animation tracks automatically
|
|
21
|
-
|
|
22
|
-
### 🎥 Camera System
|
|
23
|
-
|
|
24
|
-
- 6 animatable properties: translate X/Y, scale, rotate X/Y, perspective
|
|
25
|
-
- Multi-keyframe selection with box-select and shift-click
|
|
26
|
-
- Visual camera controls with real-time preview
|
|
27
|
-
|
|
28
|
-
### 🖱️ Interactive Cursor
|
|
29
|
-
|
|
30
|
-
- Position tracking with smooth animations
|
|
31
|
-
- Hover and click detection
|
|
32
|
-
- Component-type based interactions
|
|
33
|
-
- Visual cursor with multiple states
|
|
34
|
-
|
|
35
|
-
### 🎭 Cursor Interactions
|
|
36
|
-
|
|
37
|
-
- Add hover animations to any component type
|
|
38
|
-
- Click effects with timing control
|
|
39
|
-
- Scale, translate, and rotate on interaction
|
|
40
|
-
- Duration and easing customization
|
|
41
|
-
|
|
42
|
-
### ⚡ Advanced Timeline
|
|
43
|
-
|
|
44
|
-
- Multi-keyframe selection and editing
|
|
45
|
-
- Visual easing selector (20+ curves)
|
|
46
|
-
- View range control for focused editing
|
|
47
|
-
- Track properties panel with live preview
|
|
48
|
-
- Expression-controlled animations (programmatic)
|
|
49
|
-
|
|
50
|
-
### 🎨 Built-in Components
|
|
51
|
-
|
|
52
|
-
- Kinetic Text (typing reveal, drift, explode)
|
|
53
|
-
- Logo Reveal (particle burst)
|
|
54
|
-
- Logo Explode (SVG scatter)
|
|
55
|
-
- Interactive Demo (hover buttons)
|
|
56
|
-
- Interactive Card Grid (cursor-reactive cards)
|
|
57
|
-
- Slideshow (multi-slide transitions)
|
|
58
|
-
|
|
59
|
-
## 🛠️ Helper Functions
|
|
60
|
-
|
|
61
|
-
```typescript
|
|
62
|
-
import { createBlankComposition, addComposition } from "@/remotion/registry";
|
|
63
|
-
|
|
64
|
-
import {
|
|
65
|
-
createCameraTrack,
|
|
66
|
-
createCursorTrack,
|
|
67
|
-
createAnimationTrack,
|
|
68
|
-
createFadeInTrack,
|
|
69
|
-
createSlideInTrack,
|
|
70
|
-
createCursorPath,
|
|
71
|
-
createClickEvents,
|
|
72
|
-
validateComposition,
|
|
73
|
-
} from "@/utils/compositionHelpers";
|
|
74
|
-
|
|
75
|
-
// Create a new composition
|
|
76
|
-
const comp = createBlankComposition("My Video");
|
|
77
|
-
addComposition(comp);
|
|
78
|
-
|
|
79
|
-
// Or build manually with full control
|
|
80
|
-
const tracks = [
|
|
81
|
-
createCameraTrack(240),
|
|
82
|
-
createCursorTrack(240),
|
|
83
|
-
createFadeInTrack("title", "Title Entrance", 0, 30),
|
|
84
|
-
];
|
|
85
|
-
|
|
86
|
-
validateComposition(tracks); // Ensure it has required tracks
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## 📖 Key Concepts
|
|
90
|
-
|
|
91
|
-
### Compositions
|
|
92
|
-
|
|
93
|
-
- **ID**: URL-friendly slug (auto-generated from title)
|
|
94
|
-
- **Tracks**: Animation timelines (camera, cursor, custom)
|
|
95
|
-
- **Props**: Component configuration (colors, text, etc.)
|
|
96
|
-
- **Dimensions**: Default 1920×1080 @ 30fps
|
|
97
|
-
|
|
98
|
-
### Tracks
|
|
99
|
-
|
|
100
|
-
- **Camera**: Controls viewport (required)
|
|
101
|
-
- **Cursor**: Tracks pointer position (required for interactions)
|
|
102
|
-
- **Custom**: Element-specific animations (optional)
|
|
9
|
+
Compositions are code-driven and yours to own. Generate with AI or build manually
|
|
10
|
+
with the same track system, then refine keyframes, easing, and cursor
|
|
11
|
+
interactions on the timeline.
|
|
103
12
|
|
|
104
|
-
|
|
13
|
+
## Features
|
|
105
14
|
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
15
|
+
- Describe videos in natural language and get React components + animation tracks.
|
|
16
|
+
- Camera system with animatable translate, scale, rotate, and perspective.
|
|
17
|
+
- Interactive cursor with hover/click detection and component-type interactions.
|
|
18
|
+
- Advanced timeline: multi-keyframe editing, easing curves, and view ranges.
|
|
19
|
+
- Built-in components: kinetic text, logo reveal/explode, slideshows, and more.
|
|
20
|
+
- Standardized 1920×1080 @ 30fps compositions.
|
|
109
21
|
|
|
110
|
-
|
|
22
|
+
## Develop locally
|
|
111
23
|
|
|
112
|
-
|
|
113
|
-
- **Click**: Trigger on cursor click events
|
|
114
|
-
- **Component-Type Based**: Apply to all instances globally
|
|
115
|
-
|
|
116
|
-
## 🎯 Common Workflows
|
|
117
|
-
|
|
118
|
-
### Create with AI
|
|
119
|
-
|
|
120
|
-
1. Click "+ New Composition"
|
|
121
|
-
2. Describe your video
|
|
122
|
-
3. Attach references (optional)
|
|
123
|
-
4. Press Enter
|
|
124
|
-
5. Edit and customize
|
|
125
|
-
|
|
126
|
-
### Create Manually
|
|
127
|
-
|
|
128
|
-
1. Copy `BlankComposition.tsx` as template
|
|
129
|
-
2. Modify component code
|
|
130
|
-
3. Register in `registry.ts`
|
|
131
|
-
4. Export in `compositions/index.ts`
|
|
132
|
-
5. Navigate to `/c/your-comp-id`
|
|
133
|
-
|
|
134
|
-
### Add Cursor Interactions
|
|
135
|
-
|
|
136
|
-
1. Ensure cursor track exists
|
|
137
|
-
2. Add `<Cursor>` to component
|
|
138
|
-
3. Use `useHoverAnimation()` hook
|
|
139
|
-
4. Configure in Properties → Cursor Interactions
|
|
140
|
-
|
|
141
|
-
### Multi-Keyframe Editing
|
|
142
|
-
|
|
143
|
-
1. Box-select: Click+drag in timeline
|
|
144
|
-
2. Shift-click: Add individual keyframes
|
|
145
|
-
3. Drag selection: Move all together
|
|
146
|
-
4. Maintains relative timing
|
|
147
|
-
|
|
148
|
-
## 📁 Project Structure
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
app/
|
|
152
|
-
├── remotion/
|
|
153
|
-
│ ├── compositions/ # Video components
|
|
154
|
-
│ ├── ui-components/ # Reusable elements (Cursor, etc.)
|
|
155
|
-
│ ├── hooks/ # Animation hooks
|
|
156
|
-
│ ├── CameraHost.tsx # Camera wrapper
|
|
157
|
-
│ ├── registry.ts # Composition registry
|
|
158
|
-
│ └── trackAnimation.ts # Track utilities
|
|
159
|
-
├── components/ # Studio UI components
|
|
160
|
-
├── pages/ # Routes (Index, CompositionView)
|
|
161
|
-
├── utils/ # Helpers and utilities
|
|
162
|
-
└── contexts/ # React context providers
|
|
163
|
-
|
|
164
|
-
server/
|
|
165
|
-
├── routes/ # API endpoints
|
|
166
|
-
└── index.ts # Express server
|
|
167
|
-
|
|
168
|
-
docs/examples/
|
|
169
|
-
└── create-composition.example.ts # Example creation script
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## 🔧 Development
|
|
173
|
-
|
|
174
|
-
### Commands
|
|
24
|
+
Scaffold your own copy and run it:
|
|
175
25
|
|
|
176
26
|
```bash
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
pnpm run build # Build client and server
|
|
182
|
-
|
|
183
|
-
# Production
|
|
184
|
-
pnpm start # Run production server
|
|
185
|
-
|
|
186
|
-
# Testing
|
|
187
|
-
pnpm test # Run tests
|
|
188
|
-
pnpm typecheck # Type checking
|
|
189
|
-
pnpm format.fix # Format code
|
|
27
|
+
npx @agent-native/core@latest create my-videos --standalone --template videos
|
|
28
|
+
cd my-videos
|
|
29
|
+
pnpm install
|
|
30
|
+
pnpm dev
|
|
190
31
|
```
|
|
191
32
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
All compositions run at:
|
|
195
|
-
|
|
196
|
-
- **30fps** (standardized)
|
|
197
|
-
- **1920×1080** (Wide format default)
|
|
198
|
-
- **240 frames** (8 seconds default duration)
|
|
199
|
-
|
|
200
|
-
## 🎓 Learn More
|
|
201
|
-
|
|
202
|
-
- **Remotion Docs**: https://remotion.dev/docs
|
|
203
|
-
- **Builder.io Docs**: https://www.builder.io/c/docs/projects
|
|
204
|
-
- **Example Compositions**: Check `app/remotion/compositions/` folder
|
|
205
|
-
|
|
206
|
-
## 📝 License
|
|
207
|
-
|
|
208
|
-
Private project.
|
|
209
|
-
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
**Ready to create?** Click "+ New Composition" and describe your first video! 🎬
|
|
33
|
+
Full docs: [agent-native.com/docs/template-videos](https://agent-native.com/docs/template-videos).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantChat.d.ts","sourceRoot":"","sources":["../../src/client/AssistantChat.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAC;AAW7B,OAAO,KASN,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AASrE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAQL,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAsCzB,OAAO,EAQL,KAAK,sBAAsB,EAG5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,mBAAmB,CAAC;AAiB3B,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAE5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAEL,KAAK,WAAW,EAGjB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EAClC,qCAAqC,EACrC,mCAAmC,EACnC,4BAA4B,GAC7B,MAAM,4BAA4B,CA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OAKG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAC;IACxE,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAsDjD,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,QAI9C;AAkDD,OAAO,EACL,iBAAiB,EAElB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAw0F7B,eAAO,MAAM,aAAa,gGA2GxB,CAAC"}
|
|
@@ -68,6 +68,7 @@ const PENDING_SELECTION_KEY = "pending-selection-context";
|
|
|
68
68
|
const ACTIVE_RUN_CLEAR_TIMEOUT_MS = 5_000;
|
|
69
69
|
const ACTIVE_RUN_STUCK_THRESHOLD_MS = 90_000;
|
|
70
70
|
const ACTIVE_RUN_POLL_INTERVAL_MS = 150;
|
|
71
|
+
const AUTO_RESUME_STATUS_TIMEOUT_MS = 30_000;
|
|
71
72
|
// How long a single activity (model call, tool prep, long tool) must stay
|
|
72
73
|
// in-flight before its label is surfaced in the running indicator. Below this
|
|
73
74
|
// the indicator stays a steady "Thinking" so normal fast turns don't flicker
|
|
@@ -745,6 +746,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
745
746
|
// True during the 250ms continuation window and startup of the next chunk
|
|
746
747
|
// (adapter's auto-continue delay before POSTing the next chunk).
|
|
747
748
|
const [isAutoResuming, setIsAutoResuming] = useState(false);
|
|
749
|
+
const autoResumeTimerRef = useRef(null);
|
|
748
750
|
const [optimisticRunning, setOptimisticRunning] = useState(false);
|
|
749
751
|
const [runningActivityLabel, setRunningActivityLabel] = useState(null);
|
|
750
752
|
const [runningActivityTool, setRunningActivityTool] = useState(null);
|
|
@@ -1741,18 +1743,40 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
1741
1743
|
const detail = e.detail;
|
|
1742
1744
|
if (tabId && detail?.tabId && detail.tabId !== tabId)
|
|
1743
1745
|
return;
|
|
1746
|
+
if (autoResumeTimerRef.current !== null) {
|
|
1747
|
+
window.clearTimeout(autoResumeTimerRef.current);
|
|
1748
|
+
}
|
|
1744
1749
|
setIsAutoResuming(true);
|
|
1750
|
+
autoResumeTimerRef.current = window.setTimeout(() => {
|
|
1751
|
+
autoResumeTimerRef.current = null;
|
|
1752
|
+
setIsAutoResuming(false);
|
|
1753
|
+
}, AUTO_RESUME_STATUS_TIMEOUT_MS);
|
|
1745
1754
|
};
|
|
1746
1755
|
window.addEventListener("agent-chat:auto-continue", handler);
|
|
1747
|
-
return () =>
|
|
1756
|
+
return () => {
|
|
1757
|
+
if (autoResumeTimerRef.current !== null) {
|
|
1758
|
+
window.clearTimeout(autoResumeTimerRef.current);
|
|
1759
|
+
autoResumeTimerRef.current = null;
|
|
1760
|
+
}
|
|
1761
|
+
window.removeEventListener("agent-chat:auto-continue", handler);
|
|
1762
|
+
};
|
|
1748
1763
|
}, [tabId]);
|
|
1749
|
-
// Clear auto-resume
|
|
1764
|
+
// Clear auto-resume once the next chunk has visibly started or the user stops.
|
|
1765
|
+
// Do not clear solely because `isRunning` is false: auto-resume intentionally
|
|
1766
|
+
// covers that between-chunk gap so the chat never looks idle while work is
|
|
1767
|
+
// still scheduled.
|
|
1750
1768
|
useEffect(() => {
|
|
1751
|
-
if (
|
|
1769
|
+
if (isRunning || forceStopped) {
|
|
1770
|
+
if (autoResumeTimerRef.current !== null) {
|
|
1771
|
+
window.clearTimeout(autoResumeTimerRef.current);
|
|
1772
|
+
autoResumeTimerRef.current = null;
|
|
1773
|
+
}
|
|
1752
1774
|
setIsAutoResuming(false);
|
|
1775
|
+
}
|
|
1776
|
+
if (!isRunning && !isAutoResuming) {
|
|
1753
1777
|
resetRunningActivity();
|
|
1754
1778
|
}
|
|
1755
|
-
}, [isRunning, resetRunningActivity]);
|
|
1779
|
+
}, [forceStopped, isAutoResuming, isRunning, resetRunningActivity]);
|
|
1756
1780
|
// Auto-dequeue: when the agent is idle, send the next queued message. This
|
|
1757
1781
|
// intentionally does not depend on observing the running -> idle transition:
|
|
1758
1782
|
// restored queues can exist after a reload where this component never saw the
|