File tree Expand file tree Collapse file tree
react-ui/src/app/features/ai/assistant
ui-components/src/components/assistant-ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ const AssistantUiChat = ({
139139 runtime = { runtime }
140140 onNewChat = { onNewChatClick }
141141 title = { currentChatTitle }
142+ defaultTitle = { title }
142143 availableModels = { availableModels }
143144 onModelSelected = { onModelSelected }
144145 isModelSelectorLoading = { isModelSelectorLoading }
Original file line number Diff line number Diff line change @@ -11,15 +11,14 @@ type AssistantTopBarProps = {
1111 onClose : ( ) => void ;
1212 onNewChat : ( ) => void ;
1313 title ?: string ;
14+ defaultTitle ?: string ;
1415 onHistoryOpenChange ?: ( open : boolean ) => void ;
1516 isHistoryOpen ?: boolean ;
1617 historyContent ?: ReactNode ;
1718 children : ReactNode ;
1819 chatId ?: string | null ;
1920} ;
2021
21- const AI_ASSISTANT_DEFAULT_TITLE = t ( 'OpenOps Assistant' ) ;
22-
2322const AssistantTopBar = ( {
2423 onNewChat,
2524 onClose,
@@ -29,12 +28,14 @@ const AssistantTopBar = ({
2928 historyContent,
3029 children,
3130 chatId,
31+ defaultTitle,
3232} : AssistantTopBarProps ) => {
33+ const baseTitle = defaultTitle ?? t ( 'OpenOps Assistant' ) ;
3334 const animatedTitle = useTypingAnimation ( {
34- text : title || AI_ASSISTANT_DEFAULT_TITLE ,
35+ text : title || baseTitle ,
3536 speed : 50 ,
36- fromText : AI_ASSISTANT_DEFAULT_TITLE ,
37- defaultText : AI_ASSISTANT_DEFAULT_TITLE ,
37+ fromText : baseTitle ,
38+ defaultText : baseTitle ,
3839 chatId : chatId ,
3940 } ) ;
4041
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const AssistantUiChatContainer = ({
3636 isShowingSlowWarning,
3737 connectionError,
3838 chatId,
39+ defaultTitle,
3940} : AssistantUiChatContainerProps ) => {
4041 const codeVariation = useMemo ( ( ) => {
4142 return handleInject
@@ -53,6 +54,7 @@ const AssistantUiChatContainer = ({
5354 isHistoryOpen = { isHistoryOpen }
5455 historyContent = { children }
5556 chatId = { chatId }
57+ defaultTitle = { defaultTitle }
5658 >
5759 { null }
5860 </ AssistantTopBar >
You can’t perform that action at this time.
0 commit comments