@docyrus/ui-pro-ai-assistant 0.2.7 → 0.2.8
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 +4 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24949,11 +24949,11 @@ var DocyAssistant = ({
|
|
|
24949
24949
|
uiActions.setActiveTab(0);
|
|
24950
24950
|
setMessages([]);
|
|
24951
24951
|
};
|
|
24952
|
-
const handleSendMessage = async (e, options3) => {
|
|
24952
|
+
const handleSendMessage = async (e, options3, overrideText) => {
|
|
24953
24953
|
e?.preventDefault();
|
|
24954
|
-
|
|
24954
|
+
const messageText = (overrideText ?? input).trim();
|
|
24955
|
+
if (!messageText) return;
|
|
24955
24956
|
messageOptionsRef.current = options3;
|
|
24956
|
-
const messageText = input.trim();
|
|
24957
24957
|
let currentThreadId = selectedSessionIdRef.current;
|
|
24958
24958
|
if (!currentThreadId) {
|
|
24959
24959
|
const subject = messageText.substring(0, 100);
|
|
@@ -25024,9 +25024,7 @@ var DocyAssistant = ({
|
|
|
25024
25024
|
if (!initialPrompt || initialPromptSentRef.current) return;
|
|
25025
25025
|
initialPromptSentRef.current = true;
|
|
25026
25026
|
setInput(initialPrompt);
|
|
25027
|
-
|
|
25028
|
-
handleSendMessage();
|
|
25029
|
-
}, 300);
|
|
25027
|
+
void handleSendMessage(void 0, void 0, initialPrompt);
|
|
25030
25028
|
}, [initialPrompt]);
|
|
25031
25029
|
const handleInputChange = useCallback((e) => {
|
|
25032
25030
|
setInput(e.target.value);
|