File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/packages/frontend/chat Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1207,6 +1207,13 @@ export class ChatActions extends Actions<ChatState> {
12071207 showPreview,
12081208 } ) ;
12091209 } ;
1210+
1211+ setSelectedThread = ( threadKey : string | null ) => {
1212+ this . frameTreeActions ?. set_frame_data ( {
1213+ id : this . frameId ,
1214+ selectedThreadKey : threadKey ,
1215+ } ) ;
1216+ } ;
12101217}
12111218
12121219// We strip out any cased version of the string @chatgpt and also all mentions.
Original file line number Diff line number Diff line change @@ -141,14 +141,15 @@ export function ChatRoom({
141141 const [ filterRecentOpen , setFilterRecentOpen ] = useState < boolean > ( false ) ;
142142 const threads = useThreadList ( messages ) ;
143143 const [ selectedThreadKey , setSelectedThreadKey0 ] = useState < string | null > (
144- null ,
144+ desc ?. get ( "data-selectedThreadKey" ) ?? null ,
145145 ) ;
146- const setSelectedThreadKey = ( x ) => {
146+ const setSelectedThreadKey = ( x : string | null ) => {
147147 if ( x != null && x != ALL_THREADS_KEY ) {
148148 actions . clearAllFilters ( ) ;
149149 actions . setFragment ( ) ;
150150 }
151151 setSelectedThreadKey0 ( x ) ;
152+ actions . setSelectedThread ?.( x ) ;
152153 } ;
153154 const [ lastThreadKey , setLastThreadKey ] = useState < string | null > ( null ) ;
154155 const [ renamingThread , setRenamingThread ] = useState < string | null > ( null ) ;
You can’t perform that action at this time.
0 commit comments