Commit 2af3a1f1 authored by tyyin lan's avatar tyyin lan

Merge branch 'shirlyn' into 'master'

Merge branch 'shirlyn' into 'master'

See merge request !94
parents 8f461992 6db48280
...@@ -19,7 +19,7 @@ export function defaultPersonalAppConfigState(): PersonalAppConfigState { ...@@ -19,7 +19,7 @@ export function defaultPersonalAppConfigState(): PersonalAppConfigState {
continuousQuestionStatus: 'default', continuousQuestionStatus: 'default',
continuousQuestionSystem: '', continuousQuestionSystem: '',
continuousQuestionTurn: 3, continuousQuestionTurn: 3,
variableStructure: [], variableStructure: null,
isLongMemory: 'N', isLongMemory: 'N',
}, },
knowledgeConfig: { knowledgeConfig: {
......
...@@ -203,15 +203,14 @@ function handleEnterKeypress(event: KeyboardEvent) { ...@@ -203,15 +203,14 @@ function handleEnterKeypress(event: KeyboardEvent) {
</div> </div>
<div> <div>
<n-collapse-transition :show="isShowCarousel"> <n-collapse-transition :show="isShowCarousel">
<div> <div class="mb-[20px]">
<n-carousel autoplay class="h-[280px] w-full rounded-[20px] object-cover 2xl:object-fill"> <n-carousel autoplay class="h-[280px] w-full rounded-[20px] object-cover 2xl:object-fill">
<img class="h-full w-full object-cover" src="@/assets/images/application-square-carousel.png" /> <img class="h-full w-full object-cover" src="@/assets/images/application-square-carousel.png" />
<!-- <img class="h-[280px] w-full object-cover" src="@/assets/images/application-square-carousel.png" /> --> <!-- <img class="h-[280px] w-full object-cover" src="@/assets/images/application-square-carousel.png" /> -->
</n-carousel> </n-carousel>
</div> </div>
<div class="h-[20px] bg-[#f3f6f9]"></div>
</n-collapse-transition> </n-collapse-transition>
<div class="sticky top-[-30px] z-10"> <div class="sticky top-[-24px] z-10">
<n-scrollbar x-scrollable> <n-scrollbar x-scrollable>
<div class="flex items-center rounded-[5px] bg-white py-[9px] pl-[9px]"> <div class="flex items-center rounded-[5px] bg-white py-[9px] pl-[9px]">
<button <button
...@@ -227,9 +226,9 @@ function handleEnterKeypress(event: KeyboardEvent) { ...@@ -227,9 +226,9 @@ function handleEnterKeypress(event: KeyboardEvent) {
</div> </div>
</n-scrollbar> </n-scrollbar>
</div> </div>
<n-scrollbar style="max-height: 920px"> <n-scrollbar style="max-height: 854px">
<div> <div>
<div class="mt-[14px] min-h-[800px]"> <div class="mt-[14px] min-h-[808px]">
<div v-show="agentApplicationClassifyIsLoading" class="flex h-[500px] items-center justify-center"> <div v-show="agentApplicationClassifyIsLoading" class="flex h-[500px] items-center justify-center">
<n-spin size="large" /> <n-spin size="large" />
</div> </div>
......
...@@ -134,7 +134,7 @@ function handleChangeMemoryFragmentState(value: boolean) { ...@@ -134,7 +134,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
</template> </template>
{{ memoryVariableItem.key }} {{ memoryVariableItem.key }}
</n-popover> </n-popover>
<div v-else class="max-w-[105px] truncate text-[#151b26]">{{ memoryVariableItem.key }}</div> <div v-else class="max-w-[105px] truncate px-[3px] text-[#151b26]">{{ memoryVariableItem.key }}</div>
<n-popover placement="bottom" trigger="hover" :show-arrow="false" class="p-[4px]!"> <n-popover placement="bottom" trigger="hover" :show-arrow="false" class="p-[4px]!">
<template #trigger> <template #trigger>
...@@ -142,7 +142,7 @@ function handleChangeMemoryFragmentState(value: boolean) { ...@@ -142,7 +142,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
</template> </template>
<div class="text-[12px]"> <div class="text-[12px]">
<div <div
class="flex h-[30px] w-[90px] cursor-pointer items-center justify-start px-[8px] py-[5px] hover:rounded-[4px] hover:bg-[#f2f5f9]" class="flex h-[30px] cursor-pointer items-center justify-start px-[8px] py-[5px] hover:rounded-[4px] hover:bg-[#f2f5f9]"
@click="handleShowMemoryVariableModal" @click="handleShowMemoryVariableModal"
> >
<Edit theme="outline" size="16" fill="#333" :stroke-width="3" /><span class="ml-[4px]"> <Edit theme="outline" size="16" fill="#333" :stroke-width="3" /><span class="ml-[4px]">
...@@ -154,7 +154,7 @@ function handleChangeMemoryFragmentState(value: boolean) { ...@@ -154,7 +154,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
</span> </span>
</div> </div>
<div <div
class="flex h-[30px] w-[90px] cursor-pointer items-center justify-start px-[8px] py-[5px] hover:rounded-[4px] hover:bg-[#f2f5f9]" class="flex h-[30px] cursor-pointer items-center justify-start px-[8px] py-[5px] hover:rounded-[4px] hover:bg-[#f2f5f9]"
@click="handleCopyMemoryVariableName(memoryVariableItem)" @click="handleCopyMemoryVariableName(memoryVariableItem)"
> >
<Copy theme="outline" size="16" fill="#333" :stroke-width="3" /> <Copy theme="outline" size="16" fill="#333" :stroke-width="3" />
...@@ -166,17 +166,15 @@ function handleChangeMemoryFragmentState(value: boolean) { ...@@ -166,17 +166,15 @@ function handleChangeMemoryFragmentState(value: boolean) {
}} }}
</span> </span>
</div> </div>
<n-space> <div
<div class="flex h-[30px] w-full cursor-pointer items-center justify-start px-[8px] py-[5px] hover:rounded-[4px] hover:bg-[#f2f5f9]"
class="flex h-[30px] w-[90px] cursor-pointer items-center justify-start px-[8px] py-[5px] hover:rounded-[4px] hover:bg-[#f2f5f9]" @click="handleDeleteMemoryVariableItem(memoryVariableItem)"
@click="handleDeleteMemoryVariableItem(memoryVariableItem)" >
> <ReduceOne theme="outline" size="16" fill="#333" :stroke-width="3" />
<ReduceOne theme="outline" size="16" fill="#333" :stroke-width="3" /> <span class="ml-[4px]">
<span class="ml-[4px]"> {{ t('common_module.delete') }}
{{ t('common_module.delete') }} </span>
</span> </div>
</div>
</n-space>
</div> </div>
</n-popover> </n-popover>
</div> </div>
......
...@@ -107,7 +107,7 @@ function handleOpenMemoryPreviewModal(MemoryTabName: string) { ...@@ -107,7 +107,7 @@ function handleOpenMemoryPreviewModal(MemoryTabName: string) {
<template> <template>
<div class="flex h-full min-w-[300px] flex-[2_2_0%] flex-col overflow-hidden bg-[#f2f5f9]"> <div class="flex h-full min-w-[300px] flex-[2_2_0%] flex-col overflow-hidden bg-[#f2f5f9]">
<div class="flex justify-between"> <div class="flex items-center justify-between">
<div class="mb-[18px] flex w-full items-center justify-between px-5 py-[18px]"> <div class="mb-[18px] flex w-full items-center justify-between px-5 py-[18px]">
<p class="text-base"> <p class="text-base">
{{ t('personal_space_module.agent_module.agent_setting_module.agent_config_module.preview') }} {{ t('personal_space_module.agent_module.agent_setting_module.agent_config_module.preview') }}
...@@ -136,11 +136,11 @@ function handleOpenMemoryPreviewModal(MemoryTabName: string) { ...@@ -136,11 +136,11 @@ function handleOpenMemoryPreviewModal(MemoryTabName: string) {
<n-popover placement="bottom" trigger="hover" class="p-[4px]!" :show-arrow="false"> <n-popover placement="bottom" trigger="hover" class="p-[4px]!" :show-arrow="false">
<template #trigger> <template #trigger>
<div class="flex items-center justify-center pl-5 text-[14px]"> <div class="flex items-center justify-center pl-5 text-[14px]">
<Brain theme="outline" size="16" fill="#333" /> <Brain theme="outline" size="15" fill="#333" />
<div class="mx-[4px]"> <div class="mx-[4px]">
{{ t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory') }} {{ t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory') }}
</div> </div>
<Down theme="outline" size="16" fill="#333" class="inline" /> <Down theme="outline" size="15" fill="#333" class="mt-[2px] inline" />
</div> </div>
</template> </template>
<div> <div>
......
...@@ -225,11 +225,14 @@ function handleToApplicationSquare() { ...@@ -225,11 +225,14 @@ function handleToApplicationSquare() {
<div class="flex items-center justify-start p-[12px]"> <div class="flex items-center justify-start p-[12px]">
<AllApplication theme="filled" size="24" fill="#000dff" :stroke-width="3" /> <AllApplication theme="filled" size="24" fill="#000dff" :stroke-width="3" />
<div class="ml-[12px]"> <div class="ml-[12px]">
<div class="hover:text-theme-color flex cursor-pointer items-center" @click="handleToApplicationSquare"> <div class="flex">
<div class="mr-[2px]"> <span
class="hover:text-theme-color flex cursor-pointer items-center gap-[4px]"
@click="handleToApplicationSquare"
>
{{ t('router_title_module.application_square') }} {{ t('router_title_module.application_square') }}
</div> <CustomIcon icon="ep:top-right" />
<CustomIcon icon="ep:top-right" /> </span>
</div> </div>
<div class="text-[#84868c]"> <div class="text-[#84868c]">
......
...@@ -248,7 +248,7 @@ function handleModalOpenAfter() { ...@@ -248,7 +248,7 @@ function handleModalOpenAfter() {
</div> </div>
</div> </div>
</div> </div>
<div v-show="longMemoryList.length === 0" class="mt-[60px] flex h-[250px] flex-col items-center"> <div v-show="longMemoryList.length === 0" class="mt-[90px] flex h-[250px] flex-col items-center">
<img src="@/assets/images/empty.png" width="144px" height="100px" /> <img src="@/assets/images/empty.png" width="144px" height="100px" />
<div class="text-[14px]">{{ t('common_module.empty_data') }}</div> <div class="text-[14px]">{{ t('common_module.empty_data') }}</div>
</div> </div>
......
...@@ -109,7 +109,9 @@ function handleMemoryVariableFormSave() { ...@@ -109,7 +109,9 @@ function handleMemoryVariableFormSave() {
const isAllValid = results.every((result) => result) const isAllValid = results.every((result) => result)
if (isAllValid) { if (isAllValid) {
personalAppConfigStore.commConfig.variableStructure = memoryVariableTable.value personalAppConfigStore.commConfig.variableStructure = memoryVariableTable.value.length
? memoryVariableTable.value
: null
handleMemoryPreviewModalClose(true) handleMemoryPreviewModalClose(true)
window.$message.success(t('common_module.save_success_message')) window.$message.success(t('common_module.save_success_message'))
} else { } else {
...@@ -149,6 +151,7 @@ defineExpose({ ...@@ -149,6 +151,7 @@ defineExpose({
class="h-auto max-h-[720px]" class="h-auto max-h-[720px]"
:mask-closable="false" :mask-closable="false"
:auto-focus="false" :auto-focus="false"
:on-after-leave="handleMemoryPreviewModalClose"
> >
<div class="flex flex-col items-center justify-center"> <div class="flex flex-col items-center justify-center">
<div class="max-h-[720px] w-[820px] rounded-lg bg-white p-[24px]"> <div class="max-h-[720px] w-[820px] rounded-lg bg-white p-[24px]">
...@@ -165,7 +168,7 @@ defineExpose({ ...@@ -165,7 +168,7 @@ defineExpose({
size="18" size="18"
fill="#00000073" fill="#00000073"
class="cursor-pointer" class="cursor-pointer"
@click="handleMemoryPreviewModalClose()" @click="isShowMemoryVariableModal = false"
/> />
</div> </div>
<div <div
...@@ -188,7 +191,7 @@ defineExpose({ ...@@ -188,7 +191,7 @@ defineExpose({
</div> </div>
</div> </div>
<div> <div>
<n-scrollbar style="max-height: 490px; overflow: hidden"> <n-scrollbar style="max-height: 450px; overflow: hidden">
<div class="flex justify-center"> <div class="flex justify-center">
<table class="w-full"> <table class="w-full">
<thead class="sticky top-[0px] z-20 text-[#5c5f66]"> <thead class="sticky top-[0px] z-20 text-[#5c5f66]">
...@@ -309,7 +312,7 @@ defineExpose({ ...@@ -309,7 +312,7 @@ defineExpose({
/> />
</n-form-item> </n-form-item>
</td> </td>
<td class="ml-[15px] mt-[5px] flex pl-[12px] pt-[10px]"> <td class="ml-[15px] mt-[5px] flex pl-[12px]">
<n-tooltip trigger="hover"> <n-tooltip trigger="hover">
<template #trigger> <template #trigger>
<Delete <Delete
...@@ -381,7 +384,7 @@ defineExpose({ ...@@ -381,7 +384,7 @@ defineExpose({
<div class="mt-[24px] flex justify-end"> <div class="mt-[24px] flex justify-end">
<button <button
class="hover:text-theme-color hover:border-theme-color !mr-[12px] box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] px-[10px] outline-none transition-all duration-300 hover:border-[theme-color]" class="hover:text-theme-color hover:border-theme-color !mr-[12px] box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] px-[10px] outline-none transition-all duration-300 hover:border-[theme-color]"
@click="handleMemoryPreviewModalClose()" @click="isShowMemoryVariableModal = false"
> >
{{ t('common_module.cancel_btn_text') }} {{ t('common_module.cancel_btn_text') }}
</button> </button>
......
...@@ -328,7 +328,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -328,7 +328,7 @@ const handleCardContentScrollDebounce = debounce(
</template> </template>
<!-- <div <!-- <div
v-show="agentAppItem.baseInfo.agentPublishStatus !== 'draft'" v-show="agentAppItem.baseInfo.agentPublishStatus !== 'draft'"
class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]" class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] p-[5px] text-[14px] leading-[14px] text-[#333333]"
@click="handleAnalysisPersonalApp(agentAppItem)" @click="handleAnalysisPersonalApp(agentAppItem)"
> >
{{ t('common_module.data_table_module.analysis') }} {{ t('common_module.data_table_module.analysis') }}
...@@ -344,7 +344,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -344,7 +344,7 @@ const handleCardContentScrollDebounce = debounce(
> >
<template #trigger> <template #trigger>
<div <div
class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]" class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] p-[5px] text-[14px] leading-[14px] text-[#333333]"
> >
{{ t('common_module.data_table_module.remove_applications') }} {{ t('common_module.data_table_module.remove_applications') }}
</div> </div>
...@@ -358,7 +358,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -358,7 +358,7 @@ const handleCardContentScrollDebounce = debounce(
</div> </div>
<div v-show="agentAppItem.isSale === 'N'"> <div v-show="agentAppItem.isSale === 'N'">
<div <div
class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]" class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] p-[5px] text-[14px] leading-[14px] text-[#333333]"
@click="handleChangeApplicationsSaleStatus(agentAppItem)" @click="handleChangeApplicationsSaleStatus(agentAppItem)"
> >
{{ t('common_module.data_table_module.listing_applications') }} {{ t('common_module.data_table_module.listing_applications') }}
...@@ -367,7 +367,7 @@ const handleCardContentScrollDebounce = debounce( ...@@ -367,7 +367,7 @@ const handleCardContentScrollDebounce = debounce(
</div> </div>
<div <div
class="hover:bg-active-color mb-[8px] mt-[8px] h-[24px] min-w-[72px] rounded-[4px] py-[5px] pl-[8px] text-[14px] leading-[14px] text-[#F25744]" class="hover:bg-active-color mb-[8px] mt-[8px] h-[24px] min-w-[72px] rounded-[4px] p-[5px] text-[14px] leading-[14px] text-[#F25744]"
@click="handleDeletePersonalApp(agentAppItem.baseInfo.agentId)" @click="handleDeletePersonalApp(agentAppItem.baseInfo.agentId)"
> >
{{ t('common_module.delete') }} {{ t('common_module.delete') }}
......
...@@ -116,6 +116,7 @@ function handleModalOpenAfter() { ...@@ -116,6 +116,7 @@ function handleModalOpenAfter() {
:on-after-enter="handleModalOpenAfter" :on-after-enter="handleModalOpenAfter"
class="h-auto max-h-[720px]" class="h-auto max-h-[720px]"
:mask-closable="false" :mask-closable="false"
:on-after-leave="handleApplicationsSaleSettingModalClose"
> >
<div class="flex flex-col items-center justify-center"> <div class="flex flex-col items-center justify-center">
<div class="max-h-[720px] w-[720px] rounded-lg bg-white p-[24px]"> <div class="max-h-[720px] w-[720px] rounded-lg bg-white p-[24px]">
...@@ -134,7 +135,7 @@ function handleModalOpenAfter() { ...@@ -134,7 +135,7 @@ function handleModalOpenAfter() {
size="12" size="12"
fill="#00000073" fill="#00000073"
class="cursor-pointer" class="cursor-pointer"
@click="handleApplicationsSaleSettingModalClose" @click="isShowSaleApplicationsConfigurationModal = false"
/> />
</div> </div>
...@@ -204,7 +205,7 @@ function handleModalOpenAfter() { ...@@ -204,7 +205,7 @@ function handleModalOpenAfter() {
<div class="mt-[24px] flex justify-end"> <div class="mt-[24px] flex justify-end">
<button <button
class="hover:text-theme-color hover:border-theme-color !mr-[12px] box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] px-[10px] outline-none transition-all duration-300 hover:border-[theme-color]" class="hover:text-theme-color hover:border-theme-color !mr-[12px] box-content !h-[38px] !w-[74px] cursor-pointer rounded-[6px] border-[1px] border-solid border-[#dde3f0] px-[10px] outline-none transition-all duration-300 hover:border-[theme-color]"
@click="handleApplicationsSaleSettingModalClose" @click="isShowSaleApplicationsConfigurationModal = false"
> >
{{ t('common_module.cancel_btn_text') }} {{ t('common_module.cancel_btn_text') }}
</button> </button>
......
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