| | |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <PlayBar v-model="inputValue" @send-click="sendClick" /> |
| | | <PlayBar v-model="inputValue" @send-click="sendClick" :is-home="true"/> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | import router from '/@/router'; |
| | | import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom'; |
| | | import emitter from '/@/utils/mitt'; |
| | | import { handleNormalAuth } from '/@/utils/request'; |
| | | const emits = defineEmits(['sendClick']); |
| | | const inputValue = ref('你是谁?'); |
| | | |
| | | const sendClick = async () => { |
| | | const sendClick = async (cb) => { |
| | | if (!inputValue.value) return; |
| | | if (!activeSectionAId.value) { |
| | | ElMessage.warning('请选择应用场景'); |
| | | return; |
| | | } |
| | | if (!handleNormalAuth()) { |
| | | return; |
| | | } |
| | | |
| | |
| | | setLLm(item.logicId); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // getLLMList(); |
| | | emitter.on('updateChatInput', (value) => { |
| | | inputValue.value = value; |
| | | }); |
| | | }); |
| | | const updateChatInput = (val)=>{ |
| | | inputValue.value = val; |
| | | |
| | | } |
| | | |
| | | defineExpose({ |
| | | updateChatInput |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .set-waterTitle { |