File tree Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type Props = {
59
59
documents ?: ChatDocuments
60
60
actionInfo ?: string | null
61
61
onNewBranch ?: ( ) => void
62
+ temporaryChat ?: boolean
62
63
}
63
64
64
65
export const PlaygroundMessage = ( props : Props ) => {
@@ -411,7 +412,7 @@ export const PlaygroundMessage = (props: Props) => {
411
412
</ Tooltip >
412
413
) }
413
414
414
- { props ?. onNewBranch && (
415
+ { props ?. onNewBranch && ! props ?. temporaryChat && (
415
416
< Tooltip title = { t ( "newBranch" ) } >
416
417
< button
417
418
aria-label = { t ( "newBranch" ) }
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export const Header: React.FC<Props> = ({
59
59
queryKey : [ "fetchModel" ] ,
60
60
queryFn : ( ) => fetchChatModels ( { returnEmpty : true } ) ,
61
61
refetchIntervalInBackground : false ,
62
- staleTime : 1000 * 60 * 1 ,
62
+ staleTime : 1000 * 60 * 1
63
63
} )
64
64
65
65
const { data : prompts , isLoading : isPromptLoading } = useQuery ( {
@@ -90,9 +90,8 @@ export const Header: React.FC<Props> = ({
90
90
91
91
return (
92
92
< div
93
- className = { `absolute top-0 z-10 flex h-14 w-full flex-row items-center justify-center p-3 overflow-x-auto lg:overflow-x-visible bg-gray-50 border-b dark:bg-[#171717] dark:border-gray-600 ${
94
- temporaryChat && "!bg-gray-200 dark:!bg-black"
95
- } `} >
93
+ data-istemporary-chat = { temporaryChat }
94
+ className = { `absolute top-0 z-10 flex h-14 w-full flex-row items-center justify-center p-3 overflow-x-auto lg:overflow-x-visible bg-gray-50 border-b dark:bg-[#171717] dark:border-gray-600 data-[istemporary-chat='true']:bg-gray-200 data-[istemporary-chat='true']:dark:bg-black` } >
96
95
< div className = "flex gap-2 items-center" >
97
96
{ pathname !== "/" && (
98
97
< div >
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export const NewChat: React.FC<Props> = ({ clearChat }) => {
31
31
}
32
32
} }
33
33
className = "inline-flex dark:bg-transparent bg-white items-center rounded-lg border-s-0 rounded-s-none border dark:border-gray-700 bg-transparent px-3 py-2.5 text-xs lg:text-sm font-medium leading-4 text-gray-800 dark:text-white disabled:opacity-50 ease-in-out transition-colors duration-200 hover:bg-gray-100 dark:hover:bg-gray-800 dark:hover:text-white data-[istemporary-chat='true']:bg-gray-100 data-[istemporary-chat='true']:dark:bg-gray-800" >
34
- < BsIncognito className = "size-4 sm:size-5 text-gray-600 dark:text-gray-300 " />
34
+ < BsIncognito className = "size-4 sm:size-5 text-gray-500 dark:text-gray-400 " />
35
35
</ button >
36
36
</ Tooltip >
37
37
{ /* </Dropdown> */ }
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ export const PlaygroundChat = () => {
15
15
ttsEnabled,
16
16
onSubmit,
17
17
actionInfo,
18
- createChatBranch
18
+ createChatBranch,
19
+ temporaryChat
19
20
} = useMessageOption ( )
20
21
const [ isSourceOpen , setIsSourceOpen ] = React . useState ( false )
21
22
const [ source , setSource ] = React . useState < any > ( null )
@@ -59,6 +60,7 @@ export const PlaygroundChat = () => {
59
60
openReasoning = { openReasoning }
60
61
modelImage = { message ?. modelImage }
61
62
modelName = { message ?. modelName }
63
+ temporaryChat = { temporaryChat }
62
64
onContinue = { ( ) => {
63
65
onSubmit ( {
64
66
image : "" ,
Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ export const SidePanelBody = () => {
12
12
regenerateLastMessage,
13
13
editMessage,
14
14
isSearchingInternet,
15
- createChatBranch
15
+ createChatBranch,
16
+ temporaryChat
16
17
} = useMessage ( )
17
18
const [ isSourceOpen , setIsSourceOpen ] = React . useState ( false )
18
19
const [ source , setSource ] = React . useState < any > ( null )
@@ -52,6 +53,7 @@ export const SidePanelBody = () => {
52
53
reasoningTimeTaken = { message ?. reasoning_time_taken }
53
54
modelImage = { message ?. modelImage }
54
55
modelName = { message ?. modelName }
56
+ temporaryChat = { temporaryChat }
55
57
/>
56
58
) ) }
57
59
</ div >
You can’t perform that action at this time.
0 commit comments