@@ -15,6 +15,7 @@ import { useThreadsContext } from '@/state/ThreadsContext';
1515import useParticipants from '@/state/useParticipants' ;
1616
1717import Loader from '../common/Loader' ;
18+ import Thread from '../common/response/Thread' ;
1819import { useSettings } from '../context/SettingsContext' ;
1920import MarkdownEditor from './MarkdownEditor' ;
2021import Prompts from './prompts/Prompts' ;
@@ -38,10 +39,12 @@ const ResponseInput: FC<{
3839 } ) ;
3940 const { instructions } = useSettings ( ) ;
4041 const { t : generalT } = useTranslation ( 'translations' ) ;
41- const { postResponse } = useThreadsContext ( ) ;
42+ const { postResponse, allThreads } = useThreadsContext ( ) ;
4243 const { me : myselfAsParticipant } = useParticipants ( ) ;
4344 const me = participantToAuthor ( myselfAsParticipant ) ;
4445
46+ const thread = allThreads ?. find ( ( tt ) => tt . id === threadId ) ;
47+
4548 const [ response , setResponse ] = useState < string > ( '' ) ;
4649
4750 const [ isPosting , setIsPosting ] = useState ( false ) ;
@@ -82,6 +85,7 @@ const ResponseInput: FC<{
8285 < Alert severity = "info" > { inputInstructions . content } </ Alert >
8386 ) }
8487 < Prompts onChange = { ( p ) => setGivenPrompt ( p ) } />
88+ { thread && < Thread thread = { thread } /> }
8589 < Paper
8690 variant = "outlined"
8791 sx = { { width : { md : '75ch' , sm : '100%' } , maxWidth : '100%' } }
0 commit comments