Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ai-chat-ui
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
chenghong_tao
ai-chat-ui
Commits
d9b5230d
Commit
d9b5230d
authored
Apr 26, 2025
by
chenghong_tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix session store and loading don't resatrt
parent
cf2005b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
Layout.vue
src/components/Layout.vue
+12
-1
aiBubble.vue
src/components/chatSubassembly/aiBubble.vue
+1
-0
app.js
src/store/app.js
+5
-1
task.js
src/store/task.js
+5
-1
No files found.
src/components/Layout.vue
View file @
d9b5230d
...
...
@@ -18,13 +18,15 @@
</div>
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
,
nextTick
}
from
'vue'
import
{
ref
,
onMounted
,
nextTick
,
onUnmounted
,
onBeforeUnmount
}
from
'vue'
import
Chat
from
'./Chat.vue'
import
HistoryList
from
'./HistoryList.vue'
import
difyApi
from
'../apis/difyApi'
import
{
useAppStore
}
from
'../store/app'
import
{
useTaskStore
}
from
'../store/task'
const
appStore
=
useAppStore
()
const
taskStore
=
useTaskStore
()
const
chatRef
=
ref
(
null
)
const
sideBarHidden
=
ref
(
false
)
const
getSideBarStatus
=
(
status
)
=>
{
...
...
@@ -89,9 +91,18 @@ const getUserId = () => {
}
}
const
clearTaskStore
=
(
event
)
=>
{
taskStore
.
clear
()
}
onMounted
(()
=>
{
initAppInfo
()
getUserId
()
window
.
addEventListener
(
'beforeunload'
,
clearTaskStore
);
})
onBeforeUnmount
(()
=>
{
window
.
removeEventListener
(
'beforeunload'
,
clearTaskStore
);
})
</
script
>
...
...
src/components/chatSubassembly/aiBubble.vue
View file @
d9b5230d
...
...
@@ -38,6 +38,7 @@
:icon=
"Refresh"
size=
"small"
circle
:disabled=
"isLoading"
@
click=
"reStartSSE"
/>
<el-button
...
...
src/store/app.js
View file @
d9b5230d
...
...
@@ -22,5 +22,8 @@ export const useAppStore = defineStore('app', {
this
.
userId
=
userId
}
},
persist
:
true
persist
:
{
key
:
'app'
,
storage
:
sessionStorage
}
})
\ No newline at end of file
src/store/task.js
View file @
d9b5230d
...
...
@@ -31,5 +31,8 @@ export const useTaskStore = defineStore('task', {
this
.
workflow_run_id
=
''
}
},
persist
:
true
persist
:
{
key
:
'task'
,
storage
:
sessionStorage
}
})
\ No newline at end of file
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