File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
ui/src/components/ai-chat/component/chat-input-operate Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ import { MsgWarning } from '@/utils/message'
189189
190190const route = useRoute ()
191191const {
192- query : { mode }
192+ query : { mode, question }
193193} = route as any
194194const quickInputRef = ref ()
195195const props = withDefaults (
@@ -483,11 +483,11 @@ const handleTimeChange = () => {
483483 }, 1000 )
484484}
485485
486- function sendChatHandle(event : any ) {
487- if (! event .ctrlKey ) {
486+ function sendChatHandle(event ? : any ) {
487+ if (! event ? .ctrlKey ) {
488488 // 如果没有按下组合键ctrl,则会阻止默认事件
489- event .preventDefault ()
490- if (! isDisabledChart .value && ! props .loading && ! event .isComposing ) {
489+ event ? .preventDefault ()
490+ if (! isDisabledChart .value && ! props .loading && ! event ? .isComposing ) {
491491 if (inputValue .value .trim ()) {
492492 props .sendMessage (inputValue .value , {
493493 image_list: uploadImageList .value ,
@@ -530,6 +530,10 @@ function mouseleave() {
530530}
531531
532532onMounted (() => {
533+ if (question ) {
534+ inputValue .value = decodeURIComponent (question .trim ())
535+ sendChatHandle ()
536+ }
533537 setTimeout (() => {
534538 if (quickInputRef .value && mode === ' embed' ) {
535539 quickInputRef .value .textarea .style .height = ' 0'
You can’t perform that action at this time.
0 commit comments