|
@@ -163,8 +163,43 @@
|
|
|
<span>在线</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-if="messages.length === 0 && recommendedQuestions.length!== 0" class="welcome-section" style="margin-top:-220px">
|
|
|
+ <!-- Do you want 部分 -->
|
|
|
+ <div class="suggestion-section">
|
|
|
+
|
|
|
+ <div class="cards-container">
|
|
|
+ <div class="suggestion-card">
|
|
|
+ <div class="suggestion-items" v-if="!inferenceModel">
|
|
|
+ <!-- Combine both QA pairs and guides -->
|
|
|
+ <div class="questions-list">
|
|
|
+ <div
|
|
|
+ v-for="(question, index) in recommendedQuestions"
|
|
|
+ :key="index"
|
|
|
+ class="question-item"
|
|
|
+ @click="handleQuestionClick(question.example)"
|
|
|
+ >
|
|
|
+ {{ question.example }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="suggestion-items" v-else >
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in recommendedQuestions"
|
|
|
+ :key="index"
|
|
|
+ class="suggestion-item"
|
|
|
+ @click="handleQuestionClick(item.example)"
|
|
|
+ >
|
|
|
+ {{ item.example }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 欢迎消息 -->
|
|
|
- <div v-if="messages.length === 0" class="welcome-section" style="margin-top:-220px">
|
|
|
+ <div v-if="messages.length === 0 && recommendedQuestions.length=== 0" class="welcome-section" style="margin-top:-220px">
|
|
|
<!-- Do you want 部分 -->
|
|
|
<div class="suggestion-section">
|
|
|
<h3>嗨,我是你的智能助手</h3>
|
|
@@ -199,12 +234,12 @@
|
|
|
|
|
|
<div class="suggestion-items" v-else >
|
|
|
<div
|
|
|
- v-for="(item, index) in currentQaPairsList"
|
|
|
+ v-for="(item, index) in recommendedQuestions"
|
|
|
:key="index"
|
|
|
class="suggestion-item"
|
|
|
- @click="handleQaClick(item)"
|
|
|
+ @click="handleQuestionClick(item.example)"
|
|
|
>
|
|
|
- {{ item.title }}
|
|
|
+ {{ item.example }}
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -257,8 +292,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<!-- 修改消息列表部分 -->
|
|
|
- <div v-else class="message-list" ref="messageList">
|
|
|
+ <div v-if="messages.length !== 0" class="message-list" ref="messageList">
|
|
|
<!-- 添加流式思考步骤显示 -->
|
|
|
<div v-if="currentThinkingSteps && currentThinkingSteps.length > 0" class="thinking-steps-stream">
|
|
|
<div v-for="(step, index) in currentThinkingSteps"
|
|
@@ -388,7 +424,7 @@
|
|
|
<div style="width: 80%;" v-if="message.role === 'assistant' && message.showRecommendedQuestions" class="recommended-questions">
|
|
|
<div class="questions-header">
|
|
|
<!-- <img src="../assets/svg/hot-for-ux.svg" alt="推荐" class="hot-icon" /> -->
|
|
|
- <span class="questions-title">可检索问题</span>
|
|
|
+
|
|
|
<!-- <div class="questions-subtitle">为您精选的热门问题</div> -->
|
|
|
</div>
|
|
|
<div class="questions-list">
|
|
@@ -675,14 +711,25 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 展开状态:显示三个选项按钮 -->
|
|
|
- <div class="option reply" :class="{ 'open': isFabOpen }" @click.stop="handleReply">
|
|
|
- <i class="material-icons">reply</i>
|
|
|
+ <div class="option reply" :class="{ 'open': isFabOpen }" @click.stop="handleReply">
|
|
|
+ <div class="option-content option-content--below">
|
|
|
+ <CreditCardOutlined class="option-icon" />
|
|
|
+ <span class="option-label">查看</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="option love" :class="{ 'open': isFabOpen }" @click.stop="handleStepClick">
|
|
|
- <i class="material-icons">favorite</i>
|
|
|
+ <div class="option-content option-content--below">
|
|
|
+ <AuditOutlined class="option-icon" />
|
|
|
+ <span class="option-label">任务</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="option delete" :class="{ 'open': isFabOpen }" @click.stop="handleDelete">
|
|
|
- <i class="material-icons">delete</i>
|
|
|
+ <div class="option-content option-content--below">
|
|
|
+ <ProfileOutlined class="option-icon" />
|
|
|
+ <span class="option-label">命令集</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 关闭按钮:只在展开状态显示 -->
|
|
@@ -921,6 +968,9 @@ import {
|
|
|
FolderOutlined,
|
|
|
SelectOutlined,
|
|
|
DownloadOutlined,
|
|
|
+ CreditCardOutlined,
|
|
|
+ AuditOutlined,
|
|
|
+ ProfileOutlined
|
|
|
} from "@ant-design/icons-vue";
|
|
|
import leftIcon from "../assets/svg/left.svg";
|
|
|
import rightIcon from "../assets/svg/right.svg";
|
|
@@ -951,6 +1001,7 @@ import { useRouter } from 'vue-router'
|
|
|
import { message } from 'ant-design-vue';
|
|
|
import VueOfficeDocx from '@vue-office/docx';
|
|
|
import VueOfficeExcel from '@vue-office/excel';
|
|
|
+
|
|
|
// import { getRecommendedQuestions } from '../api/report';
|
|
|
/* import '@vue-office/docx/lib/index.css';
|
|
|
import '@vue-office/excel/lib/index.css'; */
|
|
@@ -1939,8 +1990,8 @@ const summaryHtml=ref('')
|
|
|
}
|
|
|
}
|
|
|
if(currentEvent === 'final_summary'){
|
|
|
- // 检查summary是否以"无效命令:"开头
|
|
|
- if (data.summary && data.summary.startsWith('无效命令:')) {
|
|
|
+ // 检查summary是否以"命令集提示:"开头
|
|
|
+ if (data.summary && data.summary.startsWith('命令集提示:')) {
|
|
|
// 调用推荐问题接口
|
|
|
await fetchRecommendedQuestions();
|
|
|
} else {
|
|
@@ -2571,7 +2622,7 @@ const updateCollapsedState = () => {
|
|
|
const chatElement = document.querySelector('.chat');
|
|
|
document.querySelector('.input-container').style.width = `98%`;
|
|
|
if (chatElement) {
|
|
|
- chatElement.style.right = `${rightMenuWidth.value}px`;
|
|
|
+ chatElement.style.right = `460px`;
|
|
|
} else {
|
|
|
console.warn('未找到聊天容器元素');
|
|
|
}
|
|
@@ -2636,7 +2687,7 @@ const updateCollapsedState = () => {
|
|
|
}else{
|
|
|
rightMenuWidth.value = 0;
|
|
|
if (document.querySelector('.chat')) {
|
|
|
- document.querySelector('.chat').style.right = `${rightMenuWidth.value}px`;
|
|
|
+ document.querySelector('.chat').style.right = `460px`;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -2899,10 +2950,9 @@ const updateCollapsedState = () => {
|
|
|
message.info('收藏功能');
|
|
|
};
|
|
|
|
|
|
- const handleDelete = () => {
|
|
|
- console.log('删除功能');
|
|
|
- // 这里可以添加删除逻辑
|
|
|
- message.info('删除功能');
|
|
|
+ const handleDelete = async () => {
|
|
|
+ inferenceModel.value = true;
|
|
|
+ await fetchRecommendedQuestions();
|
|
|
};
|
|
|
|
|
|
// 初始化主题
|
|
@@ -3349,7 +3399,7 @@ const updateCollapsedState = () => {
|
|
|
background-color: var(--primary-bg);
|
|
|
/* margin: 16px; */
|
|
|
border-radius: 16px;
|
|
|
- box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
|
|
|
+ box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
|
|
|
}
|
|
|
|
|
|
.chat-header {
|
|
@@ -6767,7 +6817,7 @@ button,
|
|
|
}
|
|
|
|
|
|
.question-item {
|
|
|
- padding: 12px 16px;
|
|
|
+ padding: 5px 16px;
|
|
|
background: #f8f9fa;
|
|
|
border-radius: 6px;
|
|
|
cursor: pointer;
|
|
@@ -6798,7 +6848,7 @@ button,
|
|
|
right: 5%;
|
|
|
width: 50px;
|
|
|
height: 50px;
|
|
|
- background: #ffd700;
|
|
|
+ background: #4096ff;
|
|
|
border-radius: 50%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -6876,7 +6926,7 @@ button,
|
|
|
position: absolute;
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
- background: #ffd700;
|
|
|
+ background: #4096ff;
|
|
|
border-radius: 50%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -6929,7 +6979,7 @@ button,
|
|
|
position: absolute;
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
- background: #6a4c93;
|
|
|
+ background: #0080cc;
|
|
|
border-radius: 50%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -7071,6 +7121,19 @@ button,
|
|
|
.fab:not(.open) .option.delete {
|
|
|
animation: collapseDelete 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
|
}
|
|
|
+.option-content {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ gap: 4px;
|
|
|
+}
|
|
|
+.option-content--below { flex-direction: column; }
|
|
|
+.option-content--above { flex-direction: column-reverse; }
|
|
|
+
|
|
|
+.option-icon { font-size: 18px; color: #fff; }
|
|
|
+.option-label { font-size: 10px; color: #fff; line-height: 1; }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/* 动画关键帧定义 */
|
|
|
@keyframes expandReply {
|
|
@@ -7304,4 +7367,13 @@ button,
|
|
|
left: calc(((100% / 3) * 2) - 3px);
|
|
|
}
|
|
|
*/
|
|
|
+ :deep(.anticon-credit-card) {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+:deep(.anticon-audit) {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+:deep(.anticon-profile) {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
</style>
|