@lota-sdk/ui 0.1.16 → 0.1.18
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.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
|
-
"lint": "
|
|
18
|
+
"lint": "bunx oxlint --fix -c ../oxlint.config.ts src",
|
|
19
19
|
"format": "bunx oxfmt src",
|
|
20
20
|
"typecheck": "bunx tsgo --noEmit",
|
|
21
21
|
"test:unit": "bun test ../tests/unit/ui"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"registry": "https://registry.npmjs.org/"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@lota-sdk/shared": "0.1.
|
|
28
|
+
"@lota-sdk/shared": "0.1.18",
|
|
29
29
|
"ai": "^6.0.137"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
@@ -105,10 +105,10 @@ export function useThreadChat<UI_MESSAGE extends UIMessage>({
|
|
|
105
105
|
// has no StrictMode guard, causing two concurrent GET streams.
|
|
106
106
|
const resumedForChatRef = useRef<string | null>(null)
|
|
107
107
|
useEffect(() => {
|
|
108
|
-
if (!resume || resumedForChatRef.current === chatId) return
|
|
108
|
+
if (!resume || status !== 'ready' || resumedForChatRef.current === chatId) return
|
|
109
109
|
resumedForChatRef.current = chatId
|
|
110
110
|
void resumeStream()
|
|
111
|
-
}, [resume, chatId, resumeStream])
|
|
111
|
+
}, [resume, status, chatId, resumeStream])
|
|
112
112
|
|
|
113
113
|
const stop = useCallback(async () => {
|
|
114
114
|
const stopRequest = threadId && stopRemoteRun ? stopRemoteRun(threadId) : Promise.resolve(null)
|