@lota-sdk/ui 0.4.2 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lota-sdk/ui",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -25,7 +25,7 @@
25
25
  "registry": "https://registry.npmjs.org/"
26
26
  },
27
27
  "dependencies": {
28
- "@lota-sdk/shared": "0.4.2",
28
+ "@lota-sdk/shared": "0.4.4",
29
29
  "ai": "^6.0.145"
30
30
  },
31
31
  "peerDependencies": {
@@ -222,8 +222,11 @@ export function useSnapshottingChat<UI_MESSAGE extends UIMessage = UIMessage>({
222
222
  chatRef.current.messages = messagesParam
223
223
  }, [])
224
224
 
225
+ // Manual resume with ref guard — prevents React StrictMode double-fire.
226
+ const resumeCalledRef = useRef(false)
225
227
  useEffect(() => {
226
- if (resume) {
228
+ if (resume && !resumeCalledRef.current) {
229
+ resumeCalledRef.current = true
227
230
  void chatRef.current.resumeStream()
228
231
  }
229
232
  }, [resume])
@@ -23,6 +23,7 @@ export function getExecutionPlanActionLabel(action: string, isRunning: boolean):
23
23
  }
24
24
 
25
25
  export function getExecutionPlanStatusLabel(status: string | null | undefined): string {
26
+ if (status === 'pending-approval') return 'Pending Approval'
26
27
  if (status === 'running') return 'Running'
27
28
  if (status === 'awaiting-human') return 'Awaiting Human'
28
29
  if (status === 'blocked') return 'Blocked'