Commit 9c3e4b1f authored by tyyin lan's avatar tyyin lan

chore(首页): 顶部显示选择应用

parent 4572e989
......@@ -99,7 +99,6 @@ home_module:
switching_over: '切换中...'
history_application_success: '历史记录应用成功'
history_application_failed_please_try_again: '历史记录应用失败,请重试'
cui_xiang_Assistant: '萃想助手'
starting_a_new_session: '发起新会话'
please_enter_a_question: '请输入问题(按enter+shift键可换行)'
all_of_the_above_content_is_generated_by_ai_and_is_for_reference_only: '以上内容均由AI生成,仅供参考'
......
......@@ -100,7 +100,6 @@ home_module:
switching_over: '切換中...'
history_application_success: '歷史記錄應用成功'
history_application_failed_please_try_again: '歷史記錄應用失敗,請重試'
cui_xiang_Assistant: '萃想助手'
starting_a_new_session: '發起新會話'
please_enter_a_question: '請輸入問題(按enter+shift鍵可換行)'
all_of_the_above_content_is_generated_by_ai_and_is_for_reference_only: '以上內容均由AI生成,僅供參考'
......
......@@ -4,9 +4,11 @@ import { nanoid } from 'nanoid'
import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { debounce } from 'lodash-es'
import type { AgentApplicationRecordItem } from '../types'
interface Props {
messageListLength: number
currentAgentApplication: AgentApplicationRecordItem
}
interface RecommendQuestionItem {
......@@ -114,8 +116,11 @@ const handleRecommendQuestionListUpdate = debounce(
<div v-else class="flex-center flex">
<div class="font-600 flex items-center rounded-[31px] bg-[#ECEFFF] px-[38px] py-[11px] text-[18px]">
<div class="bg-px-home-cuixiang_icon-png mr-[6px] h-[28px] w-[28px] bg-no-repeat"></div>
<span>{{ t('home_module.cui_xiang_Assistant') }}</span>
<div
class="mr-[6px] h-[22px] w-[22px] bg-contain bg-no-repeat"
:style="{ backgroundImage: `url(${currentAgentApplication.agentAvatar})` }"
></div>
<span>{{ currentAgentApplication.agentTitle || '--' }}</span>
</div>
</div>
</Transition>
......
......@@ -32,7 +32,7 @@ const isAgentMessage = computed(() => {
<div class="ml-[11px]">
<div class="mb-[7px] text-[12px] text-[#999]">
{{ isAgentMessage ? '萃想AI' : userStore.userInfo.nickName }}
{{ isAgentMessage ? 'AI助理' : userStore.userInfo.nickName }}
</div>
<div
class="box-content min-h-[21px] min-w-[10px] rounded-[10px] border border-[#9EA3FF] px-[15px] py-[14px] text-justify"
......
......@@ -185,7 +185,11 @@ function onGetMessageRecordList(recordId: string) {
:class="{ '!pr-[273px]': isShowHistoryMenu }"
>
<div class="mx-auto flex h-full w-[750px] flex-col px-[5px] py-[40px]">
<AgentAbout v-model:question-content="questionContent" :message-list-length="messageList.size" />
<AgentAbout
v-model:question-content="questionContent"
:message-list-length="messageList.size"
:current-agent-application="currentAgentApplication"
/>
<MessageList v-show="isShowMessageList" ref="messageListRef" :message-list="messageList" />
......
......@@ -43,7 +43,7 @@ export default function fetchEventStreamSource(
const data = JSON.parse(e.data)
if (data.code === 0 || data.code === '0') {
options.onmessage && options.onmessage(data.message)
data.message && options.onmessage && options.onmessage(data.message)
} else {
options.onerror && options.onerror(new Error(data.message))
}
......
......@@ -104,7 +104,6 @@ declare namespace I18n {
switching_over: string
history_application_success: string
history_application_failed_please_try_again: string
cui_xiang_Assistant: string
starting_a_new_session: string
please_enter_a_question: string
all_of_the_above_content_is_generated_by_ai_and_is_for_reference_only: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment