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
7e941450
Commit
7e941450
authored
Dec 17, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
Beta See merge request
!115
parents
561a4e8b
6f07ed6f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
5 deletions
+48
-5
index.html
index.html
+1
-1
message-tip-modal.vue
src/components/message-tip-modal/message-tip-modal.vue
+7
-3
en.yaml
src/locales/langs/en.yaml
+2
-0
zh-cn.yaml
src/locales/langs/zh-cn.yaml
+2
-0
zh-hk.yaml
src/locales/langs/zh-hk.yaml
+2
-0
agent-setting.vue
...g/components/agent-config/agent-setting/agent-setting.vue
+31
-0
global.d.ts
types/global.d.ts
+1
-1
locales.d.ts
types/locales.d.ts
+2
-0
No files found.
index.html
View file @
7e941450
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<head>
<head>
<meta
charset=
"UTF-8"
/>
<meta
charset=
"UTF-8"
/>
<link
rel=
"icon"
href=
"/favicon.ico"
/>
<link
rel=
"icon"
href=
"/favicon.ico"
/>
<meta
name=
"
apple-
mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"mobile-web-app-capable"
content=
"yes"
/>
<meta
<meta
name=
"viewport"
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
content=
"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
...
...
src/components/message-tip-modal/message-tip-modal.vue
View file @
7e941450
...
@@ -12,6 +12,8 @@ const isShowModal = ref(false)
...
@@ -12,6 +12,8 @@ const isShowModal = ref(false)
const
modalOptions
=
reactive
({
const
modalOptions
=
reactive
({
title
:
t
(
'common_module.tip'
),
title
:
t
(
'common_module.tip'
),
content
:
''
,
content
:
''
,
cancelText
:
t
(
'common_module.cancel_btn_text'
),
confirmText
:
t
(
'common_module.confirm_btn_text'
),
})
})
let
_modalStatusResolve
=
(
_value
?:
any
)
=>
{}
let
_modalStatusResolve
=
(
_value
?:
any
)
=>
{}
...
@@ -33,9 +35,11 @@ function handleConfirm() {
...
@@ -33,9 +35,11 @@ function handleConfirm() {
_modalStatusResolve
(
true
)
_modalStatusResolve
(
true
)
}
}
function
handleShowModal
(
content
:
string
,
title
?:
string
)
{
function
handleShowModal
(
content
:
string
,
title
?:
string
,
cancelText
?:
string
,
confirmText
?:
string
)
{
modalOptions
.
content
=
content
modalOptions
.
content
=
content
title
&&
(
modalOptions
.
title
=
title
)
title
&&
(
modalOptions
.
title
=
title
)
cancelText
&&
(
modalOptions
.
cancelText
=
cancelText
)
confirmText
&&
(
modalOptions
.
confirmText
=
confirmText
)
isShowModal
.
value
=
true
isShowModal
.
value
=
true
...
@@ -63,11 +67,11 @@ function handleShowModal(content: string, title?: string) {
...
@@ -63,11 +67,11 @@ function handleShowModal(content: string, title?: string) {
<div
class=
"mt-[50px] text-end"
>
<div
class=
"mt-[50px] text-end"
>
<n-button
color=
"#F5F5F5"
round
class=
"!px-[34px] !py-[10px] !text-[14px] !text-[#333]"
@
click=
"handleCancel"
>
<n-button
color=
"#F5F5F5"
round
class=
"!px-[34px] !py-[10px] !text-[14px] !text-[#333]"
@
click=
"handleCancel"
>
{{
t
(
'common_module.cancel_btn_text'
)
}}
{{
modalOptions
.
cancelText
||
t
(
'common_module.cancel_btn_text'
)
}}
</n-button>
</n-button>
<n-button
color=
"#6F77FF"
round
class=
"!ml-[12px] !px-[34px] !py-[10px] !text-[14px]"
@
click=
"handleConfirm"
>
<n-button
color=
"#6F77FF"
round
class=
"!ml-[12px] !px-[34px] !py-[10px] !text-[14px]"
@
click=
"handleConfirm"
>
{{
t
(
'common_module.confirm_btn_text'
)
}}
{{
modalOptions
.
confirmText
||
t
(
'common_module.confirm_btn_text'
)
}}
</n-button>
</n-button>
</div>
</div>
</div>
</div>
...
...
src/locales/langs/en.yaml
View file @
7e941450
...
@@ -126,6 +126,7 @@ common_module:
...
@@ -126,6 +126,7 @@ common_module:
unlimited_duration
:
'
Unlimited
duration'
unlimited_duration
:
'
Unlimited
duration'
buy_now
:
'
Buy
now'
buy_now
:
'
Buy
now'
payment_success
:
'
Payment
success'
payment_success
:
'
Payment
success'
back
:
'
Back'
dialogue_module
:
dialogue_module
:
continue_question_message
:
'
You
can
keep
asking
questions'
continue_question_message
:
'
You
can
keep
asking
questions'
...
@@ -557,6 +558,7 @@ equity_module:
...
@@ -557,6 +558,7 @@ equity_module:
point_recharge
:
'
Point
recharge'
point_recharge
:
'
Point
recharge'
get_points_for_interacting_with_the_ai
:
'
Get
{points}
points
for
interacting
with
the
AI'
get_points_for_interacting_with_the_ai
:
'
Get
{points}
points
for
interacting
with
the
AI'
no_time_limit_when_used_up
:
'
No
time
limit,
when
used
up'
no_time_limit_when_used_up
:
'
No
time
limit,
when
used
up'
agents_created_exceeds_tip
:
'
The
number
of
agents
created
exceeds
the
current
package
benefits,
please
upgrade
the
package'
order_manage_module
:
order_manage_module
:
package_name
:
'
PackageName'
package_name
:
'
PackageName'
...
...
src/locales/langs/zh-cn.yaml
View file @
7e941450
...
@@ -125,6 +125,7 @@ common_module:
...
@@ -125,6 +125,7 @@ common_module:
unlimited_duration
:
'
无期限'
unlimited_duration
:
'
无期限'
buy_now
:
'
立即购买'
buy_now
:
'
立即购买'
payment_success
:
'
支付成功'
payment_success
:
'
支付成功'
back
:
'
返回'
dialogue_module
:
dialogue_module
:
continue_question_message
:
'
你可以继续提问'
continue_question_message
:
'
你可以继续提问'
...
@@ -555,6 +556,7 @@ equity_module:
...
@@ -555,6 +556,7 @@ equity_module:
point_recharge
:
'
积分充值'
point_recharge
:
'
积分充值'
get_points_for_interacting_with_the_ai
:
'
获得{points}积分,用于和AI互动行动'
get_points_for_interacting_with_the_ai
:
'
获得{points}积分,用于和AI互动行动'
no_time_limit_when_used_up
:
'
无期限,用完即止'
no_time_limit_when_used_up
:
'
无期限,用完即止'
agents_created_exceeds_tip
:
'
创建应用数量超出当前套餐权益,请升级套餐'
order_manage_module
:
order_manage_module
:
package_name
:
'
套餐名称'
package_name
:
'
套餐名称'
...
...
src/locales/langs/zh-hk.yaml
View file @
7e941450
...
@@ -125,6 +125,7 @@ common_module:
...
@@ -125,6 +125,7 @@ common_module:
unlimited_duration
:
'
無期限'
unlimited_duration
:
'
無期限'
buy_now
:
'
立即購買'
buy_now
:
'
立即購買'
payment_success
:
'
支付成功'
payment_success
:
'
支付成功'
back
:
'
返回'
dialogue_module
:
dialogue_module
:
continue_question_message
:
'
你可以繼續提問'
continue_question_message
:
'
你可以繼續提問'
...
@@ -555,6 +556,7 @@ equity_module:
...
@@ -555,6 +556,7 @@ equity_module:
point_recharge
:
'
积分充值'
point_recharge
:
'
积分充值'
get_points_for_interacting_with_the_ai
:
'
獲得{points}積分,用於和AI互動行動'
get_points_for_interacting_with_the_ai
:
'
獲得{points}積分,用於和AI互動行動'
no_time_limit_when_used_up
:
'
無期限,用完即止'
no_time_limit_when_used_up
:
'
無期限,用完即止'
agents_created_exceeds_tip
:
'
創建應用數量超出當前套餐權益,請升級套餐'
order_manage_module
:
order_manage_module
:
package_name
:
'
套餐名稱'
package_name
:
'
套餐名稱'
...
...
src/views/personal-space/personal-app-setting/components/agent-config/agent-setting/agent-setting.vue
View file @
7e941450
...
@@ -4,6 +4,7 @@ import { FormInst, InputInst } from 'naive-ui'
...
@@ -4,6 +4,7 @@ import { FormInst, InputInst } from 'naive-ui'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
Emitter
}
from
'mitt'
import
{
Emitter
}
from
'mitt'
import
{
storeToRefs
}
from
'pinia'
import
{
storeToRefs
}
from
'pinia'
import
{
useRouter
}
from
'vue-router'
import
{
useThrottleFn
}
from
'@vueuse/core'
import
{
useThrottleFn
}
from
'@vueuse/core'
import
CustomIcon
from
'@/components/custom-icon/custom-icon.vue'
import
CustomIcon
from
'@/components/custom-icon/custom-icon.vue'
import
{
Help
,
People
,
RightOne
}
from
'@icon-park/vue-next'
import
{
Help
,
People
,
RightOne
}
from
'@icon-park/vue-next'
...
@@ -11,6 +12,7 @@ import UploadImage from '@/components/upload-image/upload-image.vue'
...
@@ -11,6 +12,7 @@ import UploadImage from '@/components/upload-image/upload-image.vue'
import
AutoConfigModal
from
'./components/auto-config-modal.vue'
import
AutoConfigModal
from
'./components/auto-config-modal.vue'
import
OptimizeSystemModal
from
'./components/optimize-system-modal.vue'
import
OptimizeSystemModal
from
'./components/optimize-system-modal.vue'
import
{
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
import
{
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
PersonalAppConfigState
}
from
'@/store/types/personal-app-config'
import
{
PersonalAppConfigState
}
from
'@/store/types/personal-app-config'
import
{
import
{
fetchCreateAgentAvatar
,
fetchCreateAgentAvatar
,
...
@@ -28,7 +30,10 @@ import AgentRoleSetting from './components/agent-role-setting.vue'
...
@@ -28,7 +30,10 @@ import AgentRoleSetting from './components/agent-role-setting.vue'
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
router
=
useRouter
()
const
personalAppConfigStore
=
usePersonalAppConfigStore
()
const
personalAppConfigStore
=
usePersonalAppConfigStore
()
const
userStore
=
useUserStore
()
const
{
baseInfo
,
commConfig
,
commModelConfig
,
knowledgeConfig
}
=
storeToRefs
(
personalAppConfigStore
)
const
{
baseInfo
,
commConfig
,
commModelConfig
,
knowledgeConfig
}
=
storeToRefs
(
personalAppConfigStore
)
...
@@ -130,6 +135,21 @@ async function handleCreatePersonalAgent() {
...
@@ -130,6 +135,21 @@ async function handleCreatePersonalAgent() {
return
return
}
}
await
handleGetEquityInfo
()
if
(
userStore
.
equityInfo
.
usedAgentCount
>=
userStore
.
equityInfo
.
maxAgentCount
)
{
window
.
$message
.
ctWarning
(
t
(
'equity_module.agents_created_exceeds_tip'
),
''
,
t
(
'common_module.back'
))
.
then
(()
=>
{
router
.
replace
({
name
:
'Equity'
})
})
.
catch
(()
=>
{
router
.
back
()
})
handleStopGenerate
()
return
}
const
res
=
await
fetchSaveAgentApplication
<
PersonalAppConfigState
>
(
personalAppConfigStore
.
$state
)
const
res
=
await
fetchSaveAgentApplication
<
PersonalAppConfigState
>
(
personalAppConfigStore
.
$state
)
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
@@ -342,6 +362,17 @@ function handleStopGenerate() {
...
@@ -342,6 +362,17 @@ function handleStopGenerate() {
generateAgentSystemController
?.
abort
()
generateAgentSystemController
?.
abort
()
isFullScreenLoading
.
value
=
false
isFullScreenLoading
.
value
=
false
}
}
async
function
handleGetEquityInfo
()
{
if
(
!
userStore
.
isLogin
)
{
router
.
push
({
name
:
'Login'
,
query
:
{
redirect
:
encodeURIComponent
(
router
.
currentRoute
.
value
.
fullPath
)
},
})
}
await
userStore
.
fetchUpdateEquityInfo
()
}
</
script
>
</
script
>
<
template
>
<
template
>
...
...
types/global.d.ts
View file @
7e941450
...
@@ -3,7 +3,7 @@ declare interface Window {
...
@@ -3,7 +3,7 @@ declare interface Window {
$loadingBar
:
import
(
'naive-ui'
).
LoadingBarProviderInst
$loadingBar
:
import
(
'naive-ui'
).
LoadingBarProviderInst
$dialog
:
import
(
'naive-ui'
).
DialogProviderInst
$dialog
:
import
(
'naive-ui'
).
DialogProviderInst
$message
:
import
(
'naive-ui'
).
MessageProviderInst
&
{
$message
:
import
(
'naive-ui'
).
MessageProviderInst
&
{
ctWarning
:
(
message
:
string
,
title
?:
string
)
=>
Promise
<
boolean
|
Error
>
ctWarning
:
(
message
:
string
,
title
?:
string
,
cancelText
?:
string
,
confirmText
?:
string
)
=>
Promise
<
boolean
|
Error
>
}
}
$notification
:
import
(
'naive-ui'
).
NotificationProviderInst
$notification
:
import
(
'naive-ui'
).
NotificationProviderInst
}
}
...
...
types/locales.d.ts
View file @
7e941450
...
@@ -125,6 +125,7 @@ declare namespace I18n {
...
@@ -125,6 +125,7 @@ declare namespace I18n {
support
:
string
support
:
string
buy_now
:
string
buy_now
:
string
payment_success
:
string
payment_success
:
string
back
:
string
dialogue_module
:
{
dialogue_module
:
{
continue_question_message
:
string
continue_question_message
:
string
...
@@ -571,6 +572,7 @@ declare namespace I18n {
...
@@ -571,6 +572,7 @@ declare namespace I18n {
point_recharge
:
string
point_recharge
:
string
get_points_for_interacting_with_the_ai
:
string
get_points_for_interacting_with_the_ai
:
string
no_time_limit_when_used_up
:
string
no_time_limit_when_used_up
:
string
agents_created_exceeds_tip
:
string
}
}
order_manage_module
:
{
order_manage_module
:
{
...
...
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