Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
1a0c546c
Commit
1a0c546c
authored
Nov 13, 2024
by
tyyin lan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://gitlab.gsstcloud.com:10022/poc/poc-fe
parents
ebd56386
58d00e9e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
622 additions
and
573 deletions
+622
-573
upload-image.vue
src/components/upload-image/upload-image.vue
+1
-1
applications-square.vue
src/views/applications-square/applications-square.vue
+53
-21
message-item.vue
src/views/multi-model-dialogue/components/message-item.vue
+1
-1
app-setting-config.ts
...personal-space/personal-app-setting/app-setting-config.ts
+0
-38
agent-dialogue-setting.vue
...ersonal-app-setting/components/agent-dialogue-setting.vue
+211
-0
agent-memory-setting.vue
.../personal-app-setting/components/agent-memory-setting.vue
+241
-0
app-publish.vue
...nal-space/personal-app-setting/components/app-publish.vue
+3
-11
app-setting.vue
...nal-space/personal-app-setting/components/app-setting.vue
+17
-438
message-item.vue
...al-space/personal-app-setting/components/message-item.vue
+1
-0
page-narbar.vue
...nal-space/personal-app-setting/components/page-narbar.vue
+2
-2
preamble.vue
...rsonal-space/personal-app-setting/components/preamble.vue
+5
-1
personal-app.vue
src/views/personal-space/personal-app/personal-app.vue
+52
-31
sale-applications-configuration-modal.vue
...ce/personal-app/sale-applications-configuration-modal.vue
+17
-20
types.d.ts
src/views/personal-space/personal-app/types.d.ts
+8
-0
columns.tsx
src/views/personal-space/personal-knowledge/columns.tsx
+1
-1
knowledge-chuck-item.vue
...ce/personal-knowledge/components/knowledge-chuck-item.vue
+1
-1
document-detail.vue
...ews/personal-space/personal-knowledge/document-detail.vue
+3
-3
personal-document.vue
...s/personal-space/personal-knowledge/personal-document.vue
+1
-1
personal-knowledge.vue
.../personal-space/personal-knowledge/personal-knowledge.vue
+1
-1
types.d.ts
src/views/personal-space/personal-knowledge/types.d.ts
+0
-0
message-item.vue
src/views/share/components/message-item.vue
+1
-0
preamble.vue
src/views/share/components/preamble.vue
+1
-1
web-page-header.vue
src/views/share/components/web-page-header.vue
+1
-1
No files found.
src/components/upload-image/upload-image.vue
View file @
1a0c546c
...
@@ -107,7 +107,7 @@ async function handleUploadImage(event: any) {
...
@@ -107,7 +107,7 @@ async function handleUploadImage(event: any) {
@
mouseenter=
"isShowImageMask = true"
@
mouseenter=
"isShowImageMask = true"
@
mouseleave=
"isShowImageMask = false"
@
mouseleave=
"isShowImageMask = false"
>
>
<img
:src=
"uploadImageUrl"
class=
"h-full w-full"
/>
<img
:src=
"uploadImageUrl"
class=
"h-full w-full
object-cover
"
/>
<label
<label
v-show=
"isShowImageMask"
v-show=
"isShowImageMask"
...
...
src/views/applications-square/applications-square.vue
View file @
1a0c546c
...
@@ -36,11 +36,18 @@ const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
...
@@ -36,11 +36,18 @@ const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
const
isShowCarousel
=
ref
(
true
)
const
isShowCarousel
=
ref
(
true
)
const
smooth
=
ref
(
false
)
const
smooth
=
ref
(
false
)
const
agentApplicationBottomIsLoading
=
ref
(
false
)
const
agentApplicationBottomIsLoading
=
ref
(
false
)
const
agentApplicationClassifyIsLoading
=
ref
(
fals
e
)
const
agentApplicationClassifyIsLoading
=
ref
(
tru
e
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
))
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
))
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
behavior
=
computed
(()
=>
(
smooth
.
value
?
'smooth'
:
'auto'
))
const
behavior
=
computed
(()
=>
(
smooth
.
value
?
'smooth'
:
'auto'
))
const
isShowAgentListBottomText
=
computed
(
()
=>
agentApplicationList
.
value
.
length
>
8
&&
pagingInfo
.
value
.
pageNo
===
pagingInfo
.
value
.
totalPages
&&
!
agentApplicationClassifyIsLoading
.
value
&&
!
agentApplicationBottomIsLoading
.
value
,
)
const
{
arrivedState
}
=
useScroll
(
cardContentWrapRef
,
{
behavior
})
const
{
arrivedState
}
=
useScroll
(
cardContentWrapRef
,
{
behavior
})
;(
function
()
{
;(
function
()
{
...
@@ -74,8 +81,11 @@ watch(
...
@@ -74,8 +81,11 @@ watch(
},
},
)
)
function
handleGetAgentApplicationList
(
update
=
false
,
search
=
false
)
{
function
handleGetAgentApplicationList
(
update
=
false
,
search
=
false
,
clear
=
false
)
{
const
agentTypeId
=
ref
<
number
|
null
>
(
0
)
const
agentTypeId
=
ref
<
number
|
null
>
(
0
)
if
(
clear
&&
searchQuery
.
value
.
trim
()
===
''
)
return
if
(
agentApplicationBottomIsLoading
.
value
&&
agentApplicationClassifyIsLoading
.
value
)
return
if
(
agentApplicationBottomIsLoading
.
value
&&
agentApplicationClassifyIsLoading
.
value
)
return
if
(
search
&&
searchQuery
.
value
.
length
!==
0
)
{
if
(
search
&&
searchQuery
.
value
.
length
!==
0
)
{
...
@@ -84,6 +94,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
...
@@ -84,6 +94,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
isShowCarousel
.
value
=
true
isShowCarousel
.
value
=
true
}
}
if
(
search
)
agentApplicationClassifyIsLoading
.
value
=
true
if
(
update
)
pagingInfo
.
value
.
pageNo
=
1
if
(
update
)
pagingInfo
.
value
.
pageNo
=
1
checkedClassifyValue
.
value
===
0
?
(
agentTypeId
.
value
=
null
)
:
(
agentTypeId
.
value
=
checkedClassifyValue
.
value
)
checkedClassifyValue
.
value
===
0
?
(
agentTypeId
.
value
=
null
)
:
(
agentTypeId
.
value
=
checkedClassifyValue
.
value
)
...
@@ -92,7 +104,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
...
@@ -92,7 +104,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
pagingInfo
:
pagingInfo
.
value
,
pagingInfo
:
pagingInfo
.
value
,
categoryId
:
agentTypeId
.
value
,
categoryId
:
agentTypeId
.
value
,
}
}
fetchGetAgentApplicationList
<
PersonalAppConfigState
[]
>
(
payload
).
then
((
res
)
=>
{
fetchGetAgentApplicationList
<
PersonalAppConfigState
[]
>
(
payload
)
.
then
((
res
)
=>
{
agentApplicationList
.
value
=
update
?
res
.
data
:
[...
agentApplicationList
.
value
,
...
res
.
data
]
agentApplicationList
.
value
=
update
?
res
.
data
:
[...
agentApplicationList
.
value
,
...
res
.
data
]
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
...
@@ -102,7 +115,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
...
@@ -102,7 +115,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
:
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
)
:
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
)
emptyTableImage
.
value
=
emptyTableImage
.
value
=
searchQuery
.
value
&&
agentApplicationList
.
value
.
length
===
0
?
searchEmptyImage
:
applicationEmptyImage
searchQuery
.
value
&&
agentApplicationList
.
value
.
length
===
0
?
searchEmptyImage
:
applicationEmptyImage
})
.
finally
(()
=>
{
agentApplicationClassifyIsLoading
.
value
=
false
agentApplicationClassifyIsLoading
.
value
=
false
agentApplicationBottomIsLoading
.
value
=
false
agentApplicationBottomIsLoading
.
value
=
false
})
})
...
@@ -133,9 +147,26 @@ function handleGetMallCategoryList() {
...
@@ -133,9 +147,26 @@ function handleGetMallCategoryList() {
function
handleToUseAgentApplication
(
agentId
:
string
)
{
function
handleToUseAgentApplication
(
agentId
:
string
)
{
router
.
push
({
name
:
'ShareWebApplication'
,
params
:
{
agentId
:
agentId
}
})
router
.
push
({
name
:
'ShareWebApplication'
,
params
:
{
agentId
:
agentId
}
})
}
}
function
handleAddAgentApplications
()
{
function
handleAddAgentApplications
()
{
router
.
push
({
name
:
'PersonalAppSetting'
})
router
.
push
({
name
:
'PersonalAppSetting'
})
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
handleGetAgentApplicationList
(
true
,
true
,
true
)
}
}
function
handleSearchGetApplicationList
(
clear
=
false
)
{
if
(
clear
)
{
searchQuery
.
value
=
''
handleGetAgentApplicationList
(
true
,
true
)
}
else
{
handleGetAgentApplicationList
(
true
,
true
,
true
)
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -154,10 +185,11 @@ function handleAddAgentApplications() {
...
@@ -154,10 +185,11 @@ function handleAddAgentApplications() {
:placeholder=
"t('common_module.search')"
:placeholder=
"t('common_module.search')"
class=
"search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]"
class=
"search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]"
clearable
clearable
@
keyup
.
enter=
"handleGetAgentApplicationList(true, true)"
:on-clear=
"() => handleSearchGetApplicationList(true)"
@
keyup
.
enter=
"handleEnterKeypress"
>
>
<template
#
prefix
>
<template
#
prefix
>
<div
@
click=
"
handleGetAgentApplicationList(tru
e)"
>
<div
@
click=
"
() => handleSearchGetApplicationList(fals
e)"
>
<img
src=
"@/assets/images/search.png"
width=
"14"
height=
"14"
class=
"mr-[5px] cursor-pointer"
/>
<img
src=
"@/assets/images/search.png"
width=
"14"
height=
"14"
class=
"mr-[5px] cursor-pointer"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -204,8 +236,8 @@ function handleAddAgentApplications() {
...
@@ -204,8 +236,8 @@ function handleAddAgentApplications() {
<n-scrollbar
style=
"max-height: 920px"
>
<n-scrollbar
style=
"max-height: 920px"
>
<div>
<div>
<div
class=
"mt-[14px] min-h-[800px]"
>
<div
class=
"mt-[14px] min-h-[800px]"
>
<div
class=
"flex
justify-center"
>
<div
v-show=
"agentApplicationClassifyIsLoading"
class=
"flex h-[500px] items-center
justify-center"
>
<n-spin
v-show=
"agentApplicationClassifyIsLoading"
size=
"large"
/>
<n-spin
size=
"large"
/>
</div>
</div>
<div
<div
v-show=
"!agentApplicationClassifyIsLoading && agentApplicationList.length !== 0"
v-show=
"!agentApplicationClassifyIsLoading && agentApplicationList.length !== 0"
...
@@ -243,7 +275,7 @@ function handleAddAgentApplications() {
...
@@ -243,7 +275,7 @@ function handleAddAgentApplications() {
<div
class=
"h-[84px] w-[84px]"
>
<div
class=
"h-[84px] w-[84px]"
>
<img
<img
:src=
"agentApplicationItem.baseInfo.agentAvatar"
:src=
"agentApplicationItem.baseInfo.agentAvatar"
class=
"h-
[84px] w-[84px]
rounded-[10px] object-cover"
class=
"h-
full w-full
rounded-[10px] object-cover"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -278,7 +310,7 @@ function handleAddAgentApplications() {
...
@@ -278,7 +310,7 @@ function handleAddAgentApplications() {
</div>
</div>
</div>
</div>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<div
v-show=
"agentApplicationBottomIsLoading
&& pagingInfo.pageNo !== pagingInfo.totalPages
"
>
<div
v-show=
"agentApplicationBottomIsLoading"
>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
</div>
</div>
</div>
</div>
...
@@ -292,7 +324,7 @@ function handleAddAgentApplications() {
...
@@ -292,7 +324,7 @@ function handleAddAgentApplications() {
</div>
</div>
</div>
</div>
<div
<div
v-show=
"
agentApplicationList.length > 9 && pagingInfo.pageNo === pagingInfo.totalPages
"
v-show=
"
isShowAgentListBottomText
"
class=
"mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
class=
"mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
...
...
src/views/multi-model-dialogue/components/message-item.vue
View file @
1a0c546c
...
@@ -28,7 +28,7 @@ const assistantAvatarUrl = computed(() => {
...
@@ -28,7 +28,7 @@ const assistantAvatarUrl = computed(() => {
<div
class=
"mb-[20px] last:mb-0"
>
<div
class=
"mb-[20px] last:mb-0"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<img
<img
class=
"h-[36px] w-[36px]
rounded-full
"
class=
"h-[36px] w-[36px]
flex-shrink-0 rounded-full object-cover
"
:src=
"isAssistant ? assistantAvatarUrl : props.messageItem.avatar"
:src=
"isAssistant ? assistantAvatarUrl : props.messageItem.avatar"
alt=
"Avatar"
alt=
"Avatar"
/>
/>
...
...
src/views/personal-space/personal-app-setting/app-setting-config.ts
deleted
100644 → 0
View file @
ebd56386
export
interface
DiversityModeItem
{
label
:
string
value
:
string
topP
:
number
temperature
:
number
communicationTurn
:
number
}
export
const
diversityModeList
:
DiversityModeItem
[]
=
[
{
label
:
'personal_space_module.agent_module.agent_setting_module.agent_config_module.accurate_mode'
,
value
:
'accurate'
,
topP
:
0.1
,
temperature
:
0.1
,
communicationTurn
:
3
,
},
{
label
:
'personal_space_module.agent_module.agent_setting_module.agent_config_module.balance_mode'
,
value
:
'balance'
,
topP
:
0.7
,
temperature
:
0.5
,
communicationTurn
:
3
,
},
{
label
:
'personal_space_module.agent_module.agent_setting_module.agent_config_module.creative_mode'
,
value
:
'creative'
,
topP
:
0.7
,
temperature
:
0.95
,
communicationTurn
:
3
,
},
{
label
:
'common_module.custom'
,
value
:
'custom'
,
topP
:
0.5
,
temperature
:
0.8
,
communicationTurn
:
3
,
},
]
src/views/personal-space/personal-app-setting/components/agent-dialogue-setting.vue
0 → 100644
View file @
1a0c546c
<
script
setup
lang=
"ts"
>
import
{
computed
,
h
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
Help
,
Down
,
RightOne
}
from
'@icon-park/vue-next'
import
{
PersonalAppConfigState
}
from
'@/store/types/personal-app-config'
const
{
t
}
=
useI18n
()
const
emit
=
defineEmits
<
{
generatePreamble
:
[]
generateFeaturedQuestions
:
[]
}
>
()
const
commConfigExpandedNames
=
defineModel
<
string
[]
>
(
'commConfigExpandedNames'
,
{
required
:
true
})
const
commConfig
=
defineModel
<
PersonalAppConfigState
[
'commConfig'
]
>
(
'commConfig'
,
{
required
:
true
})
const
generatePreambleLoading
=
defineModel
<
boolean
>
(
'generatePreambleLoading'
,
{
required
:
true
})
const
generateFeaturedQuestionsLoading
=
defineModel
<
boolean
>
(
'generateFeaturedQuestionsLoading'
,
{
required
:
true
})
const
questionSettingOptions
=
[
{
label
:
()
=>
h
(
'span'
,
{},
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_default'
),
),
value
:
'default'
,
style
:
{
fontSize
:
'12px'
},
},
{
label
:
()
=>
h
(
'span'
,
{},
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_close'
),
),
value
:
'close'
,
style
:
{
fontSize
:
'12px'
},
},
]
const
continuousQuestionStatusText
=
computed
(()
=>
{
return
commConfig
.
value
.
continuousQuestionStatus
===
'default'
?
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_default'
)
:
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_close'
)
})
function
handleUpdateCommConfigExpandedNames
(
expandedNames
:
string
[])
{
commConfigExpandedNames
.
value
=
expandedNames
}
function
handleAIGeneratePreamble
()
{
emit
(
'generatePreamble'
)
}
function
handleAIGenerateFeaturedQuestions
()
{
emit
(
'generateFeaturedQuestions'
)
}
</
script
>
<
template
>
<section
class=
"border-b border-[#e8e9eb] px-5"
>
<div
class=
"pt-4"
>
<h2
class=
"my-3 text-[#84868c]"
>
{{
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.dialogue'
)
}}
</h2>
<NCollapse
:expanded-names=
"commConfigExpandedNames"
:trigger-areas=
"['main', 'arrow']"
@
update:expanded-names=
"handleUpdateCommConfigExpandedNames"
>
<template
#
arrow
>
<RightOne
theme=
"multi-color"
size=
"17"
:fill=
"['#333', '#333', '#333', '#333']"
/>
</
template
>
<NCollapseItem
:title=
"t('personal_space_module.agent_module.agent_setting_module.agent_config_module.preamble')"
name=
"preamble"
class=
"my-[13px]!"
>
<
template
#
header-extra
>
<NTooltip
trigger=
"hover"
>
<template
#
trigger
>
<div
class=
"h-4 w-4 bg-[length:100%_100%]"
:class=
"
generatePreambleLoading
? 'bg-[url(@/assets/images/loading.gif)]'
: 'bg-[url(@/assets/svgs/star.svg)]'
"
@
click=
"handleAIGeneratePreamble"
/>
</
template
>
{{ t('common_module.ai_generate') }}
</NTooltip>
</template>
<NInput
v-model:value=
"commConfig.preamble"
type=
"textarea"
:rows=
"5"
:disabled=
"generatePreambleLoading"
class=
"text-xs! rounded-md!"
:placeholder=
"
t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.preamble_input_placeholder',
)
"
/>
</NCollapseItem>
<NCollapseItem
:title=
"t('personal_space_module.agent_module.agent_setting_module.agent_config_module.featured_questions')"
name=
"featuredQuestions"
class=
"my-[13px]!"
>
<
template
#
header-extra
>
<NTooltip
trigger=
"hover"
>
<template
#
trigger
>
<div
class=
"h-4 w-4 bg-[length:100%_100%]"
:class=
"
generateFeaturedQuestionsLoading
? 'bg-[url(@/assets/images/loading.gif)]'
: 'bg-[url(@/assets/svgs/star.svg)]'
"
@
click=
"handleAIGenerateFeaturedQuestions"
/>
</
template
>
{{ t('common_module.ai_generate') }}
</NTooltip>
</template>
<NDynamicInput
v-model:value=
"commConfig.featuredQuestions"
:placeholder=
"
t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.featured_questions_input_placeholder',
)
"
class=
"rounded-md"
:min=
"1"
:max=
"3"
:disabled=
"generateFeaturedQuestionsLoading"
>
<
template
#
create-button-default
>
{{
t
(
'common_module.add'
)
}}
</
template
>
</NDynamicInput>
</NCollapseItem>
<NCollapseItem
name=
"continuousQuestion"
class=
"my-[13px]!"
>
<
template
#
header
>
<div
class=
"flex items-center"
>
<span>
{{
t
(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question'
)
}}
</span>
<NPopover
trigger=
"hover"
>
<template
#
trigger
>
<Help
theme=
"outline"
size=
"15"
fill=
"#333"
:stroke-width=
"3"
class=
"ml-1 cursor-pointer text-base text-[#999] outline-none"
/>
</
template
>
<span
class=
"text-xs"
>
{{
t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_popover_message',
)
}}
</span>
</NPopover>
</div>
</template>
<
template
#
header-extra
>
<NPopselect
v-model:value=
"commConfig.continuousQuestionStatus"
:options=
"questionSettingOptions"
trigger=
"click"
content-class=
"text-xs"
>
<div
class=
"text-theme-color flex cursor-pointer items-center justify-between text-xs"
>
<span>
{{
continuousQuestionStatusText
}}
</span>
<Down
theme=
"outline"
size=
"16"
class=
"text-theme-color ml-1 text-base"
/>
</div>
</NPopselect>
</
template
>
<div>
<span
v-show=
"commConfig.continuousQuestionStatus === 'default'"
class=
"text-xs text-[#84868c]"
>
{{
t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_default_desc',
)
}}
</span>
<span
v-show=
"commConfig.continuousQuestionStatus === 'close'"
class=
"text-xs text-[#84868c]"
>
{{
t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.continuous_question_close_desc',
)
}}
</span>
</div>
</NCollapseItem>
</NCollapse>
</div>
</section>
</template>
src/views/personal-space/personal-app-setting/components/agent-memory-setting.vue
0 → 100644
View file @
1a0c546c
This diff is collapsed.
Click to expand it.
src/views/personal-space/personal-app-setting/components/app-publish.vue
View file @
1a0c546c
...
@@ -16,15 +16,7 @@ import {
...
@@ -16,15 +16,7 @@ import {
fetchRemoveSalePublishApplication
,
fetchRemoveSalePublishApplication
,
}
from
'@/apis/agent-application'
}
from
'@/apis/agent-application'
import
{
defaultPersonalAppConfigState
,
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
import
{
defaultPersonalAppConfigState
,
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
import
{
ApplicationMallInfo
}
from
'../../personal-app/types'
interface
ApplicationMallInfo
{
agentId
:
string
agentPublishId
:
number
categoryId
:
number
isCopy
:
string
isSale
:
string
launchTime
:
string
}
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
...
@@ -334,8 +326,8 @@ function handleToApplicationSquare() {
...
@@ -334,8 +326,8 @@ function handleToApplicationSquare() {
<SaleApplicationsConfigurationModal
<SaleApplicationsConfigurationModal
v-model=
"isShowSaleApplicationsConfigurationModal"
v-model=
"isShowSaleApplicationsConfigurationModal"
:data=
"saleApplicationsInfo"
:
sale-applications-
data=
"saleApplicationsInfo"
:
category-id=
"applicationMallInfo.categoryId
"
:
application-mall-info=
"applicationMallInfo
"
@
update=
"(newValue: string) => (applicationMallInfo.isSale = newValue)"
@
update=
"(newValue: string) => (applicationMallInfo.isSale = newValue)"
@
trigger-get-application-mall-info=
"handleGetApplicationMallInfo"
@
trigger-get-application-mall-info=
"handleGetApplicationMallInfo"
/>
/>
...
...
src/views/personal-space/personal-app-setting/components/app-setting.vue
View file @
1a0c546c
This diff is collapsed.
Click to expand it.
src/views/personal-space/personal-app-setting/components/message-item.vue
View file @
1a0c546c
...
@@ -33,6 +33,7 @@ const assistantAvatar = personalAppConfigStore.baseInfo.agentAvatar
...
@@ -33,6 +33,7 @@ const assistantAvatar = personalAppConfigStore.baseInfo.agentAvatar
preview-disabled
preview-disabled
:width=
"32"
:width=
"32"
:height=
"32"
:height=
"32"
object-fit=
"cover"
class=
"mr-2 mt-1.5 h-8 w-8 rounded-full"
class=
"mr-2 mt-1.5 h-8 w-8 rounded-full"
/>
/>
...
...
src/views/personal-space/personal-app-setting/components/page-narbar.vue
View file @
1a0c546c
...
@@ -88,8 +88,8 @@ watch(
...
@@ -88,8 +88,8 @@ watch(
watch
(
watch
(
()
=>
personalAppConfig
.
value
.
knowledgeConfig
.
knowledgeIds
,
()
=>
personalAppConfig
.
value
.
knowledgeConfig
.
knowledgeIds
,
(
new
Val
)
=>
{
(
new
KnowledgeIds
)
=>
{
new
Val
&&
(
isInitGetAgentAppDetail
.
value
=
true
)
new
KnowledgeIds
.
length
&&
(
isInitGetAgentAppDetail
.
value
=
true
)
},
},
{
once
:
true
},
{
once
:
true
},
)
)
...
...
src/views/personal-space/personal-app-setting/components/preamble.vue
View file @
1a0c546c
...
@@ -19,7 +19,11 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
...
@@ -19,7 +19,11 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
<
template
>
<
template
>
<div
class=
"flex w-full flex-1 flex-col overflow-auto px-5"
>
<div
class=
"flex w-full flex-1 flex-col overflow-auto px-5"
>
<div
class=
"mb-5 flex w-full justify-center pt-[50px]"
>
<div
class=
"mb-5 flex w-full justify-center pt-[50px]"
>
<img
v-if=
"personalAppConfigStore.baseInfo.agentAvatar"
:src=
"agentAvatar"
class=
"h-[72px] w-[72px] rounded-xl"
/>
<img
v-if=
"personalAppConfigStore.baseInfo.agentAvatar"
:src=
"agentAvatar"
class=
"h-[72px] w-[72px] rounded-xl object-cover"
/>
<div
v-else
class=
"h-[72px] w-[72px] rounded-xl border"
/>
<div
v-else
class=
"h-[72px] w-[72px] rounded-xl border"
/>
</div>
</div>
...
...
src/views/personal-space/personal-app/personal-app.vue
View file @
1a0c546c
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
useTemplateRef
,
watch
}
from
'vue'
import
{
computed
,
ref
,
useTemplateRef
,
watch
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
Search
,
MoreOne
,
Star
}
from
'@icon-park/vue-next'
import
{
Search
,
MoreOne
,
Star
}
from
'@icon-park/vue-next'
import
{
PaginationInfo
}
from
'@/components/custom-pagination/custom-pagination.vue'
import
{
PaginationInfo
}
from
'@/components/custom-pagination/custom-pagination.vue'
...
@@ -56,14 +56,22 @@ const pagingInfo = ref<PaginationInfo>({
...
@@ -56,14 +56,22 @@ const pagingInfo = ref<PaginationInfo>({
const
agentAppList
=
ref
<
PersonalAppConfigState
[]
>
([])
const
agentAppList
=
ref
<
PersonalAppConfigState
[]
>
([])
const
agentSearchInputValue
=
ref
(
''
)
const
agentSearchInputValue
=
ref
(
''
)
const
agentAppListLoading
=
ref
(
fals
e
)
const
agentAppListLoading
=
ref
(
tru
e
)
const
agentAppListBottomLoadingMore
=
ref
(
false
)
const
agentAppListBottomLoadingMore
=
ref
(
false
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
))
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
))
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
isAgentAppListBottom
=
ref
(
false
)
const
isAgentAppListBottom
=
ref
(
false
)
const
isCollect
=
ref
(
''
)
const
isShowAgentListBottomText
=
computed
(
()
=>
pagingInfo
.
value
.
pageNo
===
pagingInfo
.
value
.
totalPages
&&
agentAppList
.
value
.
length
!==
0
&&
pagingInfo
.
value
.
totalRows
>
12
&&
!
agentAppListLoading
.
value
&&
!
agentAppListBottomLoadingMore
.
value
,
)
watch
(
watch
(
()
=>
isAgentAppListBottom
.
value
,
()
=>
isAgentAppListBottom
.
value
,
...
@@ -78,25 +86,30 @@ watch(
...
@@ -78,25 +86,30 @@ watch(
},
},
)
)
;(
function
()
{
;(
function
()
{
agentAppListLoading
.
value
=
true
getApplicationList
()
getApplicationList
()
})()
})()
function
getApplicationList
(
isLoadMore
=
false
)
{
function
getApplicationList
(
isLoadMore
=
false
,
clear
=
false
)
{
if
(
clear
&&
agentSearchInputValue
.
value
.
trim
()
===
''
)
{
return
}
else
{
if
(
!
agentAppListBottomLoadingMore
.
value
)
agentAppListLoading
.
value
=
true
}
if
(
!
isLoadMore
)
{
if
(
!
isLoadMore
)
{
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
totalPages
=
0
pagingInfo
.
value
.
totalPages
=
0
pagingInfo
.
value
.
totalRows
=
0
pagingInfo
.
value
.
totalRows
=
0
}
}
const
isCollect
=
ref
(
''
)
let
publishStatus
=
selectedPublishStatusValue
.
value
const
publishStatus
=
ref
(
selectedPublishStatusValue
.
value
)
isCollect
.
value
=
''
if
(
selectedPublishStatusValue
.
value
===
'Y'
)
{
if
(
selectedPublishStatusValue
.
value
===
'Y'
)
{
isCollect
.
value
=
'Y'
isCollect
.
value
=
'Y'
publishStatus
.
value
=
''
publishStatus
=
''
}
}
const
payload
=
{
const
payload
=
{
query
:
agentSearchInputValue
.
value
,
query
:
agentSearchInputValue
.
value
,
publishStatus
:
publishStatus
.
value
,
publishStatus
:
publishStatus
,
isCollect
:
isCollect
.
value
,
isCollect
:
isCollect
.
value
,
pagingInfo
:
pagingInfo
.
value
,
pagingInfo
:
pagingInfo
.
value
,
}
}
...
@@ -122,14 +135,6 @@ function handleBasePublishingStatusGetAgentList() {
...
@@ -122,14 +135,6 @@ function handleBasePublishingStatusGetAgentList() {
getApplicationList
()
getApplicationList
()
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
getApplicationList
()
}
}
function
handleDeletePersonalApp
(
agentId
:
string
)
{
function
handleDeletePersonalApp
(
agentId
:
string
)
{
window
.
$message
window
.
$message
.
ctWarning
(
t
(
'personal_space_module.agent_module.agent_list_module.delete_agent_dialog_title'
))
.
ctWarning
(
t
(
'personal_space_module.agent_module.agent_list_module.delete_agent_dialog_title'
))
...
@@ -184,9 +189,21 @@ function handleSelectAddType() {
...
@@ -184,9 +189,21 @@ function handleSelectAddType() {
router
.
push
({
name
:
'PersonalAppSetting'
})
router
.
push
({
name
:
'PersonalAppSetting'
})
}
}
// function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
function
handleSearchGetApplicationList
(
clear
=
false
)
{
// console.log('分析', personalApp)
if
(
clear
)
{
// }
agentSearchInputValue
.
value
=
''
getApplicationList
()
}
else
{
getApplicationList
(
false
,
true
)
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
getApplicationList
(
false
,
true
)
}
}
const
handleCardContentScrollDebounce
=
debounce
(
const
handleCardContentScrollDebounce
=
debounce
(
(
event
:
{
target
:
{
scrollTop
:
number
;
clientHeight
:
number
;
scrollHeight
:
number
}
})
=>
{
(
event
:
{
target
:
{
scrollTop
:
number
;
clientHeight
:
number
;
scrollHeight
:
number
}
})
=>
{
...
@@ -198,6 +215,10 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -198,6 +215,10 @@ const handleCardContentScrollDebounce = debounce(
},
},
200
,
200
,
)
)
// function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
// console.log('分析', personalApp)
// }
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -214,6 +235,8 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -214,6 +235,8 @@ const handleCardContentScrollDebounce = debounce(
v-model:value=
"agentSearchInputValue"
v-model:value=
"agentSearchInputValue"
:placeholder=
"t('common_module.search')"
:placeholder=
"t('common_module.search')"
class=
"w-[256px]! h-[32px]!"
class=
"w-[256px]! h-[32px]!"
clearable
:on-clear=
"() => handleSearchGetApplicationList(true)"
@
keypress=
"handleEnterKeypress"
@
keypress=
"handleEnterKeypress"
>
>
<template
#
suffix
>
<template
#
suffix
>
...
@@ -222,16 +245,16 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -222,16 +245,16 @@ const handleCardContentScrollDebounce = debounce(
size=
"16"
size=
"16"
fill=
"#999"
fill=
"#999"
:stroke-width=
"3"
:stroke-width=
"3"
class=
"cursor-pointer text-base"
class=
"
ml-[10px]
cursor-pointer text-base"
@
click=
"
getApplicationList(
)"
@
click=
"
() => handleSearchGetApplicationList(false
)"
/>
/>
</
template
>
</
template
>
</NInput>
</NInput>
</div>
</div>
<n-scrollbar
style=
"max-height: 700px"
@
scroll=
"handleCardContentScrollDebounce"
>
<n-scrollbar
style=
"max-height: 700px"
@
scroll=
"handleCardContentScrollDebounce"
>
<div
ref=
"cardContentWrapRef"
class=
"pb-[50px]"
>
<div
ref=
"cardContentWrapRef"
class=
"pb-[50px]"
>
<div
class=
"flex
justify-center"
>
<div
v-show=
"agentAppListLoading"
class=
"flex h-[700px] items-center
justify-center"
>
<n-spin
v-show=
"agentAppListLoading"
size=
"large"
/>
<n-spin
size=
"large"
/>
</div>
</div>
<div
v-show=
"!agentAppListLoading"
class=
"mt-[5px]"
>
<div
v-show=
"!agentAppListLoading"
class=
"mt-[5px]"
>
<div
v-if=
"agentAppList.length"
class=
"grid-content grid grid-cols-4"
>
<div
v-if=
"agentAppList.length"
class=
"grid-content grid grid-cols-4"
>
...
@@ -269,7 +292,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -269,7 +292,7 @@ const handleCardContentScrollDebounce = debounce(
>
>
</div>
</div>
<div
class=
"h-[68px] w-[68px]"
>
<div
class=
"h-[68px] w-[68px]"
>
<img
:src=
"agentAppItem.baseInfo.agentAvatar"
class=
"h-
[68px]
rounded-[10px] object-cover"
/>
<img
:src=
"agentAppItem.baseInfo.agentAvatar"
class=
"h-
full w-full
rounded-[10px] object-cover"
/>
</div>
</div>
</div>
</div>
<div>
<div>
...
@@ -350,7 +373,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -350,7 +373,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
</div>
</div>
</div>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<div
v-show=
"agentAppListBottomLoadingMore
&& pagingInfo.pageNo !== pagingInfo.totalPages
"
>
<div
v-show=
"agentAppListBottomLoadingMore"
>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
</div>
</div>
</div>
</div>
...
@@ -377,9 +400,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -377,9 +400,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
</div>
</div>
</div>
<div
<div
v-show=
"
v-show=
"isShowAgentListBottomText"
pagingInfo.pageNo === pagingInfo.totalPages && agentAppList.length !== 0 && pagingInfo.totalRows > 12
"
class=
"mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
class=
"mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
...
@@ -394,7 +415,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -394,7 +415,7 @@ const handleCardContentScrollDebounce = debounce(
<SaleApplicationsConfigurationModal
<SaleApplicationsConfigurationModal
v-model=
"isShowSaleApplicationsConfigurationModal"
v-model=
"isShowSaleApplicationsConfigurationModal"
:data=
"saleApplicationsInfo"
:
sale-applications-
data=
"saleApplicationsInfo"
@
update=
"(newValue: string) => (saleApplicationsInfo.isSale = newValue)"
@
update=
"(newValue: string) => (saleApplicationsInfo.isSale = newValue)"
/>
/>
</div>
</div>
...
...
src/views/personal-space/personal-app/sale-applications-configuration-modal.vue
View file @
1a0c546c
...
@@ -5,6 +5,7 @@ import { PersonalAppConfigState } from '@/store/types/personal-app-config'
...
@@ -5,6 +5,7 @@ import { PersonalAppConfigState } from '@/store/types/personal-app-config'
import
{
Close
,
Help
,
Notes
,
CheckSmall
}
from
'@icon-park/vue-next'
import
{
Close
,
Help
,
Notes
,
CheckSmall
}
from
'@icon-park/vue-next'
import
{
ref
,
watch
}
from
'vue'
import
{
ref
,
watch
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
ApplicationMallInfo
}
from
'./types'
interface
MallCategory
{
interface
MallCategory
{
id
:
number
id
:
number
...
@@ -14,8 +15,8 @@ interface MallCategory {
...
@@ -14,8 +15,8 @@ interface MallCategory {
const
isShowSaleApplicationsConfigurationModal
=
defineModel
<
boolean
>
()
const
isShowSaleApplicationsConfigurationModal
=
defineModel
<
boolean
>
()
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
d
ata
:
PersonalAppConfigState
saleApplicationsD
ata
:
PersonalAppConfigState
categoryId
?:
number
applicationMallInfo
?:
ApplicationMallInfo
}
>
()
}
>
()
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
update
:
[
value
:
string
]
update
:
[
value
:
string
]
...
@@ -23,13 +24,12 @@ const emit = defineEmits<{
...
@@ -23,13 +24,12 @@ const emit = defineEmits<{
}
>
()
}
>
()
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
checkedClassifyValue
=
ref
<
number
|
null
>
(
props
.
applicationMallInfo
?.
categoryId
??
0
)
const
checkedClassifyValue
=
ref
<
number
|
null
>
(
props
.
categoryId
!
)
const
isCopy
=
ref
(
props
.
saleApplicationsData
.
isCopy
===
'Y'
)
const
isCopy
=
ref
(
props
.
data
.
isCopy
===
'Y'
)
const
saleApplicationsId
=
ref
(
props
.
data
.
agentPublishId
)
const
isClassifyError
=
ref
(
false
)
const
isClassifyError
=
ref
(
false
)
const
applicationsClassify
=
ref
<
MallCategory
[]
>
([])
const
applicationsClassify
=
ref
<
MallCategory
[]
>
([])
const
agentPublishId
=
ref
(
props
.
saleApplicationsData
.
agentPublishId
)
;(
function
()
{
;(
function
()
{
handleGetMallCategoryList
()
handleGetMallCategoryList
()
...
@@ -43,17 +43,9 @@ watch(
...
@@ -43,17 +43,9 @@ watch(
)
)
watch
(
watch
(
()
=>
props
.
category
Id
,
()
=>
props
.
saleApplicationsData
.
agentPublish
Id
,
(
newValue
)
=>
{
(
newValue
)
=>
{
checkedClassifyValue
.
value
=
newValue
!
agentPublishId
.
value
=
newValue
},
)
watch
(
()
=>
props
.
data
,
(
newVal
)
=>
{
saleApplicationsId
.
value
=
newVal
.
agentPublishId
isCopy
.
value
=
newVal
.
isCopy
===
'Y'
},
},
)
)
...
@@ -69,8 +61,12 @@ function handleApplicationReleaseBtn() {
...
@@ -69,8 +61,12 @@ function handleApplicationReleaseBtn() {
return
return
}
}
if
(
props
.
applicationMallInfo
?.
agentPublishId
)
{
agentPublishId
.
value
=
props
.
applicationMallInfo
.
agentPublishId
}
const
payload
=
{
const
payload
=
{
agentPublishId
:
props
.
data
.
agentPublishId
,
agentPublishId
:
agentPublishId
.
value
,
categoryId
:
checkedClassifyValue
.
value
,
categoryId
:
checkedClassifyValue
.
value
,
isCopy
:
isCopy
.
value
?
'Y'
:
'N'
,
isCopy
:
isCopy
.
value
?
'Y'
:
'N'
,
isSale
:
'Y'
,
isSale
:
'Y'
,
...
@@ -105,9 +101,9 @@ function handleGetMallCategoryList() {
...
@@ -105,9 +101,9 @@ function handleGetMallCategoryList() {
}
}
function
handleModalOpenAfter
()
{
function
handleModalOpenAfter
()
{
if
(
props
.
data
.
isCopy
)
isCopy
.
value
=
props
.
d
ata
.
isCopy
===
'Y'
if
(
props
.
saleApplicationsData
.
isCopy
)
isCopy
.
value
=
props
.
saleApplicationsD
ata
.
isCopy
===
'Y'
if
(
props
.
d
ata
.
isSale
===
'Y'
)
{
if
(
props
.
saleApplicationsD
ata
.
isSale
===
'Y'
)
{
checkedClassifyValue
.
value
=
props
.
categoryId
!
checkedClassifyValue
.
value
=
props
.
applicationMallInfo
!
.
categoryId
}
else
{
}
else
{
checkedClassifyValue
.
value
=
0
checkedClassifyValue
.
value
=
0
}
}
...
@@ -141,6 +137,7 @@ function handleModalOpenAfter() {
...
@@ -141,6 +137,7 @@ function handleModalOpenAfter() {
@
click=
"handleApplicationsSaleSettingModalClose"
@
click=
"handleApplicationsSaleSettingModalClose"
/>
/>
</div>
</div>
<div
class=
"items-center justify-center rounded-[4px]"
>
<div
class=
"items-center justify-center rounded-[4px]"
>
<div
class=
"mb-[16px] flex items-center text-[14px] text-[#151B26]"
>
<div
class=
"mb-[16px] flex items-center text-[14px] text-[#151B26]"
>
<div
class=
"bg-theme-color mr-[8px] h-[20px] w-[20px] rounded-2xl text-center text-[#fff]"
>
1
</div>
<div
class=
"bg-theme-color mr-[8px] h-[20px] w-[20px] rounded-2xl text-center text-[#fff]"
>
1
</div>
...
...
src/views/personal-space/personal-app/types.d.ts
0 → 100644
View file @
1a0c546c
export
interface
ApplicationMallInfo
{
agentId
:
string
agentPublishId
:
number
categoryId
:
number
isCopy
:
string
isSale
:
string
launchTime
:
string
}
src/views/personal-space/personal-knowledge/columns.tsx
View file @
1a0c546c
import
{
NSwitch
}
from
'naive-ui'
import
{
NSwitch
}
from
'naive-ui'
import
{
KnowledgeDocumentItem
,
KnowledgeItem
}
from
'./
knowledge-type
'
import
{
KnowledgeDocumentItem
,
KnowledgeItem
}
from
'./
types.d
'
import
{
formatDateTime
}
from
'@/utils/date-formatter'
import
{
formatDateTime
}
from
'@/utils/date-formatter'
import
i18n
from
'@/locales'
import
i18n
from
'@/locales'
...
...
src/views/personal-space/personal-knowledge/components/knowledge-chuck-item.vue
View file @
1a0c546c
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
KnowledgeChunkItem
}
from
'../
knowledge-type
'
import
{
KnowledgeChunkItem
}
from
'../
types.d
'
interface
Props
{
interface
Props
{
chunkItem
:
KnowledgeChunkItem
chunkItem
:
KnowledgeChunkItem
...
...
src/views/personal-space/personal-knowledge/document-detail.vue
View file @
1a0c546c
...
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'
...
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
ScrollbarInst
}
from
'naive-ui'
import
{
ScrollbarInst
}
from
'naive-ui'
import
{
Left
,
Search
}
from
'@icon-park/vue-next'
import
{
Left
,
Search
}
from
'@icon-park/vue-next'
import
{
KnowledgeChunkItem
,
KnowledgeDocumentItem
}
from
'./
knowledge-type
'
import
{
KnowledgeChunkItem
,
KnowledgeDocumentItem
}
from
'./
types.d
'
import
KnowledgeChuckItem
from
'./components/knowledge-chuck-item.vue'
import
KnowledgeChuckItem
from
'./components/knowledge-chuck-item.vue'
import
{
import
{
fetchAddKnowledgeChunk
,
fetchAddKnowledgeChunk
,
...
@@ -247,8 +247,8 @@ async function handleUpdateOpenKnowledgeChunk(chunkItem: KnowledgeChunkItem) {
...
@@ -247,8 +247,8 @@ async function handleUpdateOpenKnowledgeChunk(chunkItem: KnowledgeChunkItem) {
</div>
</div>
<n-spin
:show=
"knowledgeChunkListLoading"
class=
"w-full flex-1 overflow-hidden"
content-class=
"flex w-full h-full"
>
<n-spin
:show=
"knowledgeChunkListLoading"
class=
"w-full flex-1 overflow-hidden"
content-class=
"flex w-full h-full"
>
<div
v-if=
"knowledgeChunkList.length"
class=
"flex flex-1"
>
<div
v-if=
"knowledgeChunkList.length
&& !knowledgeChunkListLoading
"
class=
"flex flex-1"
>
<n-scrollbar
v-show=
"!knowledgeChunkListLoading"
ref=
"scrollBarRef"
class=
"grid w-full flex-1 overflow-hidden"
>
<n-scrollbar
ref=
"scrollBarRef"
class=
"grid w-full flex-1 overflow-hidden"
>
<div
class=
"grid gap-5"
>
<div
class=
"grid gap-5"
>
<KnowledgeChuckItem
<KnowledgeChuckItem
v-for=
"chunkItem in knowledgeChunkList"
v-for=
"chunkItem in knowledgeChunkList"
...
...
src/views/personal-space/personal-knowledge/personal-document.vue
View file @
1a0c546c
...
@@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n'
...
@@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n'
import
{
Left
,
Search
}
from
'@icon-park/vue-next'
import
{
Left
,
Search
}
from
'@icon-park/vue-next'
import
{
useIntervalFn
}
from
'@vueuse/core'
import
{
useIntervalFn
}
from
'@vueuse/core'
import
{
createKnowledgeDocumentColumn
}
from
'./columns'
import
{
createKnowledgeDocumentColumn
}
from
'./columns'
import
{
KnowledgeDocumentItem
,
TrainStatus
}
from
'./
knowledge-type
'
import
{
KnowledgeDocumentItem
,
TrainStatus
}
from
'./
types.d
'
import
{
import
{
fetchBatchDelKnowledgeDocument
,
fetchBatchDelKnowledgeDocument
,
fetchDelKnowledgeDocument
,
fetchDelKnowledgeDocument
,
...
...
src/views/personal-space/personal-knowledge/personal-knowledge.vue
View file @
1a0c546c
...
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'
...
@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
Search
}
from
'@icon-park/vue-next'
import
{
Search
}
from
'@icon-park/vue-next'
import
{
createKnowledgeColumn
}
from
'./columns.tsx'
import
{
createKnowledgeColumn
}
from
'./columns.tsx'
import
{
KnowledgeItem
}
from
'./
knowledge-type.ts
'
import
{
KnowledgeItem
}
from
'./
types.d
'
import
CustomPagination
from
'@/components/custom-pagination/custom-pagination.vue'
import
CustomPagination
from
'@/components/custom-pagination/custom-pagination.vue'
import
useTableScrollY
from
'@/composables/useTableScrollY.ts'
import
useTableScrollY
from
'@/composables/useTableScrollY.ts'
import
{
usePagination
}
from
'@/composables/usePagination.ts'
import
{
usePagination
}
from
'@/composables/usePagination.ts'
...
...
src/views/personal-space/personal-knowledge/
knowledge-type
.ts
→
src/views/personal-space/personal-knowledge/
types.d
.ts
View file @
1a0c546c
File moved
src/views/share/components/message-item.vue
View file @
1a0c546c
...
@@ -47,6 +47,7 @@ const assistantAvatar = computed(() => {
...
@@ -47,6 +47,7 @@ const assistantAvatar = computed(() => {
preview-disabled
preview-disabled
:width=
"32"
:width=
"32"
:height=
"32"
:height=
"32"
object-fit=
"cover"
class=
"mr-2 mt-1.5 h-8 w-8 rounded-full"
class=
"mr-2 mt-1.5 h-8 w-8 rounded-full"
/>
/>
...
...
src/views/share/components/preamble.vue
View file @
1a0c546c
...
@@ -28,7 +28,7 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
...
@@ -28,7 +28,7 @@ function handleSelectFeaturedQuestion(featuredQuestion: string) {
<
template
>
<
template
>
<div
class=
"flex w-full flex-1 flex-col px-5"
>
<div
class=
"flex w-full flex-1 flex-col px-5"
>
<div
class=
"mb-5 mt-[60px] flex w-full justify-center sm:pt-[120px]"
>
<div
class=
"mb-5 mt-[60px] flex w-full justify-center sm:pt-[120px]"
>
<img
:src=
"agentAvatar"
class=
"h-[72px] w-[72px] rounded-xl"
/>
<img
:src=
"agentAvatar"
class=
"h-[72px] w-[72px] rounded-xl
object-cover
"
/>
</div>
</div>
<div
class=
"flex flex-col items-center justify-center"
>
<div
class=
"flex flex-col items-center justify-center"
>
...
...
src/views/share/components/web-page-header.vue
View file @
1a0c546c
...
@@ -49,7 +49,7 @@ function handleToLogin() {
...
@@ -49,7 +49,7 @@ function handleToLogin() {
class=
"hover:text-theme-color mr-5 cursor-pointer outline-none"
class=
"hover:text-theme-color mr-5 cursor-pointer outline-none"
@
click=
"handleBack"
@
click=
"handleBack"
/>
/>
<img
:src=
"agentApplicationConfig.baseInfo.agentAvatar"
class=
"mr-5 h-10 w-10 rounded-md"
/>
<img
:src=
"agentApplicationConfig.baseInfo.agentAvatar"
class=
"mr-5 h-10 w-10 rounded-md
object-cover
"
/>
<div
class=
"flex flex-col items-start justify-center"
>
<div
class=
"flex flex-col items-start justify-center"
>
<span
class=
"mb-1 line-clamp-1 max-w-[200px] break-all"
>
{{
agentApplicationConfig
.
baseInfo
.
agentTitle
}}
</span>
<span
class=
"mb-1 line-clamp-1 max-w-[200px] break-all"
>
{{
agentApplicationConfig
.
baseInfo
.
agentTitle
}}
</span>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment