yangyin
2024-07-07 74cdd0f00c6e6640871f35d8dd951a858ddcefa2
src/views/project/ch/home/component/waterRight/top.vue
@@ -31,16 +31,25 @@
import { GetLLMList, SetLLM } from '/@/api/ai/chat';
import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue';
import router from '/@/router';
import { activeChatRoom, activeLLMId } from '/@/stores/chatRoom';
import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom';
import emitter from '/@/utils/mitt';
import { ElMessage } from 'element-plus';
const emits = defineEmits(['sendClick']);
const inputValue = ref('');
const sendClick = () => {
   if (!inputValue.value) return;
   if (!activeSectionAId.value) {
      ElMessage.warning('请选择应用场景');
      return;
   }
   activeChatRoom.value.title = inputValue.value;
   activeChatRoom.value.isInitial = false;
   router.push({
      name: 'AskAnswer',
      query: {
         id: activeChatRoom.value.id,
      },
   });
};
let state = reactive({
@@ -106,8 +115,8 @@
onMounted(() => {
   getLLMList();
   emitter.on('updateChatInput', (value) => {
         inputValue.value = value;
      });
      inputValue.value = value;
   });
});
</script>
<style scoped lang="scss">