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
7943ed40
Commit
7943ed40
authored
Dec 04, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
fix(应用配置): 保存更新应用 See merge request
!104
parents
3e5e4c1a
17ae57e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
agent-setting.vue
...g/components/agent-config/agent-setting/agent-setting.vue
+9
-18
No files found.
src/views/personal-space/personal-app-setting/components/agent-config/agent-setting/agent-setting.vue
View file @
7943ed40
...
...
@@ -71,16 +71,6 @@ let generatePreambleController: AbortController | null = null
let
generateFeaturedQuestionsController
:
AbortController
|
null
=
null
let
generateAgentSystemController
:
AbortController
|
null
=
null
watch
(
()
=>
personalAppConfigStore
.
$state
,
()
=>
{
if
(
!
baseInfo
.
value
.
agentId
)
{
handleUpdatePersonalAppId
()
}
},
{
deep
:
true
,
once
:
true
},
)
watch
(
()
=>
personalAppConfigStore
.
$state
,
()
=>
{
...
...
@@ -109,27 +99,28 @@ onUnmounted(() => {
const
handleSavePersonalAppConfig
=
useThrottleFn
(
async
()
=>
{
baseInfo
.
value
.
agentId
&&
(
await
handleSaveAgentApplication
()
)
await
handleSaveAgentApplication
(
)
},
()
=>
(
isFullScreenLoading
.
value
?
6000
:
2000
),
true
,
)
// 保存应用配置
//
更新
保存应用配置
async
function
handleSaveAgentApplication
()
{
if
(
!
baseInfo
.
value
.
agentTitle
)
{
return
}
await
fetchSaveAgentApplication
<
PersonalAppConfigState
>
(
personalAppConfigStore
.
$state
)
}
// 更新保存应用ID
async
function
handleUpdatePersonalAppId
()
{
if
(
!
baseInfo
.
value
.
agentTitle
)
{
if
(
!
baseInfo
.
value
.
agentId
)
{
await
handleCreatePersonalAgent
()
return
}
await
fetchSaveAgentApplication
<
PersonalAppConfigState
>
(
personalAppConfigStore
.
$state
)
}
// 新建应用
async
function
handleCreatePersonalAgent
()
{
const
res
=
await
fetchSaveAgentApplication
<
PersonalAppConfigState
>
(
personalAppConfigStore
.
$state
)
if
(
res
.
code
===
0
)
{
...
...
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