|
6 | 6 | popper-class="popover-chat_history popover-chat_history_small" |
7 | 7 | > |
8 | 8 | <template #reference> |
9 | | - <el-icon class="show-history_icon" style="" size="20" @click="showFloatPopover"> |
| 9 | + <el-icon |
| 10 | + class="show-history_icon" |
| 11 | + :class="{ 'embedded-history-hidden': embeddedHistoryHidden }" |
| 12 | + style="" |
| 13 | + size="20" |
| 14 | + @click="showFloatPopover" |
| 15 | + > |
10 | 16 | <icon_sidebar_outlined></icon_sidebar_outlined> |
11 | 17 | </el-icon> |
12 | 18 | </template> |
|
17 | 23 | v-model:current-chat="currentChat" |
18 | 24 | v-model:loading="loading" |
19 | 25 | in-popover |
20 | | - :appName="customName" |
| 26 | + :app-name="customName" |
21 | 27 | @go-empty="goEmpty" |
22 | 28 | @on-chat-created="onChatCreated" |
23 | 29 | @on-click-history="onClickHistory" |
|
30 | 36 | <el-aside |
31 | 37 | v-if="(isCompletePage || pageEmbedded) && chatListSideBarShow" |
32 | 38 | class="chat-container-left" |
| 39 | + :class="{ 'embedded-history-hidden': embeddedHistoryHidden }" |
33 | 40 | > |
34 | 41 | <ChatListContainer |
35 | 42 | v-model:chat-list="chatList" |
36 | 43 | v-model:current-chat-id="currentChatId" |
37 | 44 | v-model:current-chat="currentChat" |
38 | 45 | v-model:loading="loading" |
39 | 46 | :in-popover="!chatListSideBarShow" |
40 | | - :appName="customName" |
| 47 | + :app-name="customName" |
41 | 48 | @go-empty="goEmpty" |
42 | 49 | @on-chat-created="onChatCreated" |
43 | 50 | @on-click-history="onClickHistory" |
|
50 | 57 | <div |
51 | 58 | v-if="(!isCompletePage && !pageEmbedded) || !chatListSideBarShow" |
52 | 59 | class="hidden-sidebar-btn" |
53 | | - :class="{ 'assistant-popover-sidebar': !isCompletePage && !pageEmbedded }" |
| 60 | + :class="{ |
| 61 | + 'assistant-popover-sidebar': !isCompletePage && !pageEmbedded, |
| 62 | + 'embedded-history-hidden': embeddedHistoryHidden, |
| 63 | + }" |
54 | 64 | > |
55 | 65 | <el-popover |
56 | 66 | :width="280" |
|
72 | 82 | v-model:current-chat="currentChat" |
73 | 83 | v-model:loading="loading" |
74 | 84 | :in-popover="!chatListSideBarShow" |
75 | | - :appName="customName" |
| 85 | + :app-name="customName" |
76 | 86 | @go-empty="goEmpty" |
77 | 87 | @on-chat-created="onChatCreated" |
78 | 88 | @on-click-history="onClickHistory" |
|
97 | 107 | v-model:current-chat-id="currentChatId" |
98 | 108 | v-model:current-chat="currentChat" |
99 | 109 | v-model:loading="loading" |
100 | | - :appName="customName" |
| 110 | + :app-name="customName" |
101 | 111 | :in-popover="false" |
102 | 112 | @go-empty="goEmpty" |
103 | 113 | @on-chat-created="onChatCreated" |
|
199 | 209 | :first-chat="message.first_chat" |
200 | 210 | @click-question="quickAsk" |
201 | 211 | @stop="onChatStop" |
202 | | - @loadingOver="loadingOver" |
| 212 | + @loading-over="loadingOver" |
203 | 213 | /> |
204 | 214 | <UserChat v-if="message.role === 'user'" :message="message" /> |
205 | 215 | <template v-if="message.role === 'assistant' && !message.first_chat"> |
|
216 | 226 | :current-chat-id="currentChatId" |
217 | 227 | :loading="isTyping" |
218 | 228 | :message="message" |
219 | | - @scrollBottom="scrollToBottom" |
220 | 229 | :reasoning-name="['sql_answer', 'chart_answer']" |
| 230 | + @scroll-bottom="scrollToBottom" |
221 | 231 | @finish="onChartAnswerFinish" |
222 | 232 | @error="onChartAnswerError" |
223 | 233 | @stop="onChatStop" |
|
292 | 302 | :first-chat="message.first_chat" |
293 | 303 | :disabled="isTyping" |
294 | 304 | @click-question="quickAsk" |
295 | | - @loadingOver="loadingOver" |
| 305 | + @loading-over="loadingOver" |
296 | 306 | @stop="onChatStop" |
297 | 307 | /> |
298 | 308 | </template> |
|
328 | 338 | :current-chat-id="currentChatId" |
329 | 339 | :loading="isTyping" |
330 | 340 | :message="message" |
331 | | - @scrollBottom="scrollToBottom" |
| 341 | + @scroll-bottom="scrollToBottom" |
332 | 342 | @finish="onPredictAnswerFinish" |
333 | 343 | @error="onPredictAnswerError" |
334 | 344 | @stop="onChatStop" |
@@ -446,6 +456,9 @@ const defaultFloatPopoverStyle = ref({ |
446 | 456 | }) |
447 | 457 |
|
448 | 458 | const isCompletePage = computed(() => !assistantStore.getAssistant || assistantStore.getEmbedded) |
| 459 | +const embeddedHistoryHidden = computed( |
| 460 | + () => assistantStore.getAssistant && !assistantStore.getHistory |
| 461 | +) |
449 | 462 | const customName = computed(() => { |
450 | 463 | if (!isCompletePage.value && props.pageEmbedded) return props.appName |
451 | 464 | return '' |
@@ -1321,7 +1334,9 @@ onMounted(() => { |
1321 | 1334 | border: 1px solid rgba(222, 224, 227, 1); |
1322 | 1335 | border-radius: 6px; |
1323 | 1336 | } |
1324 | | -
|
| 1337 | +.embedded-history-hidden { |
| 1338 | + display: none !important; |
| 1339 | +} |
1325 | 1340 | .show-history_icon { |
1326 | 1341 | cursor: pointer; |
1327 | 1342 | position: absolute; |
|
0 commit comments