llmasaservice-ui 0.4.7 → 0.4.9
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/index.js +3 -5
- package/dist/index.mjs +3 -5
- package/package.json +1 -1
- package/src/ChatPanel.tsx +3 -6
package/dist/index.js
CHANGED
|
@@ -115,9 +115,6 @@ var ChatPanel = ({
|
|
|
115
115
|
const [hasScroll, setHasScroll] = (0, import_react.useState)(false);
|
|
116
116
|
const bottomRef = (0, import_react.useRef)(null);
|
|
117
117
|
const [isAtBottom, setIsAtBottom] = (0, import_react.useState)(true);
|
|
118
|
-
const [lastFollowOnPrompt, setLastFollowOnPrompt] = (0, import_react.useState)(
|
|
119
|
-
null
|
|
120
|
-
);
|
|
121
118
|
const responseAreaRef = (0, import_react.useRef)(null);
|
|
122
119
|
(0, import_react.useEffect)(() => {
|
|
123
120
|
if (response && response.length > 0) {
|
|
@@ -212,13 +209,14 @@ var ChatPanel = ({
|
|
|
212
209
|
}
|
|
213
210
|
}, [history, historyChangedCallback]);
|
|
214
211
|
(0, import_react.useEffect)(() => {
|
|
215
|
-
|
|
212
|
+
console.log("followOnPromptChanged", followOnPrompt);
|
|
213
|
+
if (followOnPrompt && followOnPrompt !== "") {
|
|
216
214
|
continueChat(followOnPrompt);
|
|
217
|
-
setLastFollowOnPrompt(followOnPrompt);
|
|
218
215
|
}
|
|
219
216
|
}, [followOnPrompt]);
|
|
220
217
|
const continueChat = (suggestion) => {
|
|
221
218
|
var _a, _b, _c;
|
|
219
|
+
console.log("continueChat", suggestion);
|
|
222
220
|
if (!idle) {
|
|
223
221
|
stop(lastController);
|
|
224
222
|
setHistory((prevHistory) => {
|
package/dist/index.mjs
CHANGED
|
@@ -82,9 +82,6 @@ var ChatPanel = ({
|
|
|
82
82
|
const [hasScroll, setHasScroll] = useState(false);
|
|
83
83
|
const bottomRef = useRef(null);
|
|
84
84
|
const [isAtBottom, setIsAtBottom] = useState(true);
|
|
85
|
-
const [lastFollowOnPrompt, setLastFollowOnPrompt] = useState(
|
|
86
|
-
null
|
|
87
|
-
);
|
|
88
85
|
const responseAreaRef = useRef(null);
|
|
89
86
|
useEffect(() => {
|
|
90
87
|
if (response && response.length > 0) {
|
|
@@ -179,13 +176,14 @@ var ChatPanel = ({
|
|
|
179
176
|
}
|
|
180
177
|
}, [history, historyChangedCallback]);
|
|
181
178
|
useEffect(() => {
|
|
182
|
-
|
|
179
|
+
console.log("followOnPromptChanged", followOnPrompt);
|
|
180
|
+
if (followOnPrompt && followOnPrompt !== "") {
|
|
183
181
|
continueChat(followOnPrompt);
|
|
184
|
-
setLastFollowOnPrompt(followOnPrompt);
|
|
185
182
|
}
|
|
186
183
|
}, [followOnPrompt]);
|
|
187
184
|
const continueChat = (suggestion) => {
|
|
188
185
|
var _a, _b, _c;
|
|
186
|
+
console.log("continueChat", suggestion);
|
|
189
187
|
if (!idle) {
|
|
190
188
|
stop(lastController);
|
|
191
189
|
setHistory((prevHistory) => {
|
package/package.json
CHANGED
package/src/ChatPanel.tsx
CHANGED
|
@@ -98,9 +98,6 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
|
|
|
98
98
|
const [hasScroll, setHasScroll] = useState(false);
|
|
99
99
|
const bottomRef = useRef<HTMLDivElement | null>(null);
|
|
100
100
|
const [isAtBottom, setIsAtBottom] = useState(true);
|
|
101
|
-
const [lastFollowOnPrompt, setLastFollowOnPrompt] = useState<string | null>(
|
|
102
|
-
null
|
|
103
|
-
);
|
|
104
101
|
|
|
105
102
|
const responseAreaRef = useRef(null);
|
|
106
103
|
|
|
@@ -218,17 +215,17 @@ const ChatPanel: React.FC<ChatPanelProps & ExtraProps> = ({
|
|
|
218
215
|
}, [history, historyChangedCallback]);
|
|
219
216
|
|
|
220
217
|
useEffect(() => {
|
|
218
|
+
console.log("followOnPromptChanged", followOnPrompt);
|
|
221
219
|
if (
|
|
222
220
|
followOnPrompt &&
|
|
223
|
-
followOnPrompt !== ""
|
|
224
|
-
(lastFollowOnPrompt ?? "") !== followOnPrompt
|
|
221
|
+
followOnPrompt !== ""
|
|
225
222
|
) {
|
|
226
223
|
continueChat(followOnPrompt);
|
|
227
|
-
setLastFollowOnPrompt(followOnPrompt);
|
|
228
224
|
}
|
|
229
225
|
}, [followOnPrompt]);
|
|
230
226
|
|
|
231
227
|
const continueChat = (suggestion?: string) => {
|
|
228
|
+
console.log("continueChat", suggestion);
|
|
232
229
|
if (!idle) {
|
|
233
230
|
stop(lastController);
|
|
234
231
|
|