|
|
|
@ -27,6 +27,7 @@ const { createConfirm } = useMessage()
|
|
|
|
|
|
|
|
|
|
const messageStore = useMessageStore() |
|
|
|
|
|
|
|
|
|
const modelSelectDisabled = ref(false) |
|
|
|
|
const sendBtnLoading = ref(false) |
|
|
|
|
const subMenuActiveIndex = ref(-1) // 当前会话索引 |
|
|
|
|
const subMenuActionIndex = ref(-1) // 会话操作索引 |
|
|
|
@ -70,6 +71,16 @@ watch(
|
|
|
|
|
}, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => subMenuActiveIndex.value, |
|
|
|
|
(val) => { |
|
|
|
|
if (val === -1) { |
|
|
|
|
modelSelectDisabled.value = false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description: 点击会话操作项 |
|
|
|
|
*/ |
|
|
|
@ -216,7 +227,7 @@ async function getHistoryMessage() {
|
|
|
|
|
} |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
modelSelectDisabled.value = true |
|
|
|
|
res.records.forEach((item: any) => { |
|
|
|
|
const itemData: MessageItem = { |
|
|
|
|
messageType: item.roleType === MessageTypeEnum.USER ? MessageTypeEnum.USER : MessageTypeEnum.AI, |
|
|
|
@ -381,7 +392,7 @@ onUnmounted(() => {
|
|
|
|
|
<template #content> |
|
|
|
|
<Spin :spinning="spinning" wrapper-class-name="app-content-spin"> |
|
|
|
|
<AppModelSelect |
|
|
|
|
v-if="conversationDefaultShow" |
|
|
|
|
:disabled="modelSelectDisabled" |
|
|
|
|
:active-index="modelIndex" |
|
|
|
|
:options="modelOptions" |
|
|
|
|
@change="handleModel" |
|
|
|
@ -403,7 +414,7 @@ onUnmounted(() => {
|
|
|
|
|
<AppMessage |
|
|
|
|
v-if="!conversationDefaultShow && appMessageShow" |
|
|
|
|
ref="appMessageRef" |
|
|
|
|
class="pl-27 pr-5" |
|
|
|
|
class="pl-27 pr-5 mt-13" |
|
|
|
|
height="calc(100% - 120px)" |
|
|
|
|
:el-index="elIndex" |
|
|
|
|
:list="messageList" |
|
|
|
@ -416,7 +427,7 @@ onUnmounted(() => {
|
|
|
|
|
class="w-full" |
|
|
|
|
> |
|
|
|
|
<AppTextarea |
|
|
|
|
class="pl-44 pr-24 mt-10" |
|
|
|
|
class="pl-44 pr-24 mt-4" |
|
|
|
|
:is-upload="true" |
|
|
|
|
:default-file-url="defaultFileUrl" |
|
|
|
|
:upload-disabled="uploadDisabled" |
|
|
|
|