Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
cdee91be
authored
May 29, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ts
parent
d36a7cb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/hooks/useEditInfo.tsx
+2
-2
src/pages/chat/components/History.tsx
+2
-2
No files found.
src/
pages/chat/components/useEditTitle
.tsx
→
src/
hooks/useEditInfo
.tsx
View file @
cdee91be
import
React
,
{
useCallback
,
useRef
,
useState
,
memo
}
from
'react'
;
import
React
,
{
useCallback
,
useRef
}
from
'react'
;
import
{
import
{
Modal
,
Modal
,
ModalOverlay
,
ModalOverlay
,
...
@@ -12,7 +12,7 @@ import {
...
@@ -12,7 +12,7 @@ import {
Button
Button
}
from
'@chakra-ui/react'
;
}
from
'@chakra-ui/react'
;
export
const
useEdit
Title
=
({
export
const
useEdit
Info
=
({
title
,
title
,
placeholder
=
''
placeholder
=
''
}:
{
}:
{
...
...
src/pages/chat/components/History.tsx
View file @
cdee91be
...
@@ -22,7 +22,7 @@ import { useChatStore } from '@/store/chat';
...
@@ -22,7 +22,7 @@ import { useChatStore } from '@/store/chat';
import
ModelList
from
'./ModelList'
;
import
ModelList
from
'./ModelList'
;
import
{
useGlobalStore
}
from
'@/store/global'
;
import
{
useGlobalStore
}
from
'@/store/global'
;
import
styles
from
'../index.module.scss'
;
import
styles
from
'../index.module.scss'
;
import
{
useEdit
Title
}
from
'./useEditTitle
'
;
import
{
useEdit
Info
}
from
'@/hooks/useEditInfo
'
;
import
{
putChatHistory
}
from
'@/api/chat'
;
import
{
putChatHistory
}
from
'@/api/chat'
;
import
{
useToast
}
from
'@/hooks/useToast'
;
import
{
useToast
}
from
'@/hooks/useToast'
;
import
{
formatTimeToChatTime
,
getErrText
}
from
'@/utils/tools'
;
import
{
formatTimeToChatTime
,
getErrText
}
from
'@/utils/tools'
;
...
@@ -57,7 +57,7 @@ const PcSliderBar = ({
...
@@ -57,7 +57,7 @@ const PcSliderBar = ({
);
);
// custom title edit
// custom title edit
const
{
onOpenModal
,
EditModal
:
EditTitleModal
}
=
useEdit
Title
({
const
{
onOpenModal
,
EditModal
:
EditTitleModal
}
=
useEdit
Info
({
title
:
'自定义历史记录标题'
,
title
:
'自定义历史记录标题'
,
placeholder
:
'如果设置为空,会自动跟随聊天记录。'
placeholder
:
'如果设置为空,会自动跟随聊天记录。'
});
});
...
...
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