feat: 对话功能开发
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文本内容 -->
|
||||
<pre v-if="msg.text" class="bubble-text">{{ msg.text }}</pre>
|
||||
<MarkdownRender v-if="msg.text" :content="msg.text"></MarkdownRender>
|
||||
<!-- question 类型 part 展示 -->
|
||||
<template v-if="msg.parts">
|
||||
<div v-for="(p, idx) in msg.parts.filter((p) => p.type === 'question')" :key="'question-' + idx" class="question-part">
|
||||
@@ -112,7 +112,7 @@
|
||||
placeholder="输入消息,Ctrl+Enter 发送"
|
||||
:disabled="isSending"
|
||||
resize="none"
|
||||
@keydown.ctrl.enter.prevent="send"
|
||||
@keydown.enter="send"
|
||||
/>
|
||||
<el-button type="primary" :disabled="isSending || !inputText.trim()" :loading="isSending" @click="send"> 发送 </el-button>
|
||||
</div>
|
||||
@@ -127,6 +127,7 @@ import { ChatDotRound, ArrowRight, ArrowDown } from '@element-plus/icons-vue';
|
||||
import { useAppStore } from '@/stores/app.js';
|
||||
import { sseManager } from '@/http/sse.js';
|
||||
import axios from 'axios';
|
||||
import MarkdownRender from '@/components/MarkdownRender/index.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
Reference in New Issue
Block a user