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
4251ce1f
Commit
4251ce1f
authored
Dec 04, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(应用配置): 保存更新应用
parent
17ae57e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
agent-setting.vue
...g/components/agent-config/agent-setting/agent-setting.vue
+15
-6
No files found.
src/views/personal-space/personal-app-setting/components/agent-config/agent-setting/agent-setting.vue
View file @
4251ce1f
...
...
@@ -71,6 +71,16 @@ let generatePreambleController: AbortController | null = null
let
generateFeaturedQuestionsController
:
AbortController
|
null
=
null
let
generateAgentSystemController
:
AbortController
|
null
=
null
watch
(
()
=>
personalAppConfigStore
.
$state
,
()
=>
{
if
(
!
baseInfo
.
value
.
agentId
)
{
handleCreatePersonalAgent
()
}
},
{
deep
:
true
},
)
watch
(
()
=>
personalAppConfigStore
.
$state
,
()
=>
{
...
...
@@ -99,7 +109,7 @@ onUnmounted(() => {
const
handleSavePersonalAppConfig
=
useThrottleFn
(
async
()
=>
{
await
handleSaveAgentApplication
(
)
baseInfo
.
value
.
agentId
&&
(
await
handleSaveAgentApplication
()
)
},
()
=>
(
isFullScreenLoading
.
value
?
6000
:
2000
),
true
,
...
...
@@ -111,16 +121,15 @@ async function handleSaveAgentApplication() {
return
}
if
(
!
baseInfo
.
value
.
agentId
)
{
await
handleCreatePersonalAgent
()
return
}
await
fetchSaveAgentApplication
<
PersonalAppConfigState
>
(
personalAppConfigStore
.
$state
)
}
// 新建应用
async
function
handleCreatePersonalAgent
()
{
if
(
!
baseInfo
.
value
.
agentTitle
)
{
return
}
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