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
785d75bc
Commit
785d75bc
authored
Apr 26, 2025
by
chenghong_tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix history rename
parent
a1a53d56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
HistoryList.vue
src/components/HistoryList.vue
+14
-6
No files found.
src/components/HistoryList.vue
View file @
785d75bc
...
...
@@ -134,14 +134,22 @@ const openEdit = (id) => {
ElMessageBox
.
prompt
(
""
,
"修改会话名称"
,
{
confirmButtonText
:
"保存"
,
cancelButtonText
:
"取消"
,
// inputPattern:
// /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
// inputErrorMessage: "Invalid Email",
inputPattern
:
/
\S
/
,
inputErrorMessage
:
'会话名称不能为空'
,
inputPlaceholder
:
"请输入新的会话名称"
,
})
.
then
(
async
({
value
})
=>
{
await
difyApi
.
renameChat
(
id
,
{
name
:
value
});
getHistoryList
();
.
then
(
async
({
value
})
=>
{
if
(
!
value
)
{
ElMessage
.
error
(
"会话名称不能为空"
);
return
false
;
// Prevent the dialog from closing
}
try
{
await
difyApi
.
renameChat
(
id
,
{
name
:
value
});
getHistoryList
();
}
catch
(
error
)
{
console
.
error
(
"Failed to rename chat:"
,
error
);
ElMessage
.
error
(
"重命名会话失败"
);
}
})
.
catch
(()
=>
{
console
.
log
(
"取消修改"
);
...
...
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