File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
apps/twig/src/renderer/features/sessions/components Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ export function SessionView({
9696
9797 const sessionId = taskId ?? "default" ;
9898 const setContext = useDraftStore ( ( s ) => s . actions . setContext ) ;
99+ const requestFocus = useDraftStore ( ( s ) => s . actions . requestFocus ) ;
99100 setContext ( sessionId , {
100101 taskId,
101102 repoPath,
@@ -238,6 +239,8 @@ export function SessionView({
238239 answers ,
239240 ) ;
240241 }
242+
243+ requestFocus ( sessionId ) ;
241244 } ,
242245 [
243246 firstPendingPermission ,
@@ -246,13 +249,22 @@ export function SessionView({
246249 onSendPrompt ,
247250 isCloud ,
248251 setSessionMode ,
252+ requestFocus ,
253+ sessionId ,
249254 ] ,
250255 ) ;
251256
252257 const handlePermissionCancel = useCallback ( async ( ) => {
253258 if ( ! firstPendingPermission || ! taskId ) return ;
254259 await cancelPermission ( taskId , firstPendingPermission . toolCallId ) ;
255- } , [ firstPendingPermission , taskId , cancelPermission ] ) ;
260+ requestFocus ( sessionId ) ;
261+ } , [
262+ firstPendingPermission ,
263+ taskId ,
264+ cancelPermission ,
265+ requestFocus ,
266+ sessionId ,
267+ ] ) ;
256268
257269 const handleDragEnter = useCallback ( ( e : React . DragEvent ) => {
258270 e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments