@@ -8,6 +8,7 @@ import type React from 'react';
88import { useState , useCallback , useMemo , useEffect , useRef } from 'react' ;
99import { Box , Text } from 'ink' ;
1010import { Colors } from '../colors.js' ;
11+ import { theme } from '../semantic-colors.js' ;
1112import { useTerminalSize } from '../hooks/useTerminalSize.js' ;
1213import { useKeypress } from '../hooks/useKeypress.js' ;
1314import path from 'node:path' ;
@@ -436,7 +437,7 @@ const SessionItem = ({
436437 if ( isDisabled ) {
437438 return Colors . Gray ;
438439 }
439- return isActive ? Colors . AccentPurple : c ;
440+ return isActive ? theme . ui . focus : c ;
440441 } ;
441442
442443 const prefix = isActive ? '❯ ' : ' ' ;
@@ -775,12 +776,10 @@ export const useSessionBrowserInput = (
775776 state . setSearchQuery ( '' ) ;
776777 state . setActiveIndex ( 0 ) ;
777778 state . setScrollOffset ( 0 ) ;
778- return true ;
779779 } else if ( key . name === 'backspace' ) {
780780 state . setSearchQuery ( ( prev ) => prev . slice ( 0 , - 1 ) ) ;
781781 state . setActiveIndex ( 0 ) ;
782782 state . setScrollOffset ( 0 ) ;
783- return true ;
784783 } else if (
785784 key . sequence &&
786785 key . sequence . length === 1 &&
@@ -791,41 +790,34 @@ export const useSessionBrowserInput = (
791790 state . setSearchQuery ( ( prev ) => prev + key . sequence ) ;
792791 state . setActiveIndex ( 0 ) ;
793792 state . setScrollOffset ( 0 ) ;
794- return true ;
795793 }
796794 } else {
797795 // Navigation mode input handling. We're keeping the letter-based controls for non-search
798796 // mode only, because the letters need to act as input for the search.
799797 if ( key . sequence === 'g' ) {
800798 state . setActiveIndex ( 0 ) ;
801799 state . setScrollOffset ( 0 ) ;
802- return true ;
803800 } else if ( key . sequence === 'G' ) {
804801 state . setActiveIndex ( state . totalSessions - 1 ) ;
805802 state . setScrollOffset (
806803 Math . max ( 0 , state . totalSessions - SESSIONS_PER_PAGE ) ,
807804 ) ;
808- return true ;
809805 }
810806 // Sorting controls.
811807 else if ( key . sequence === 's' ) {
812808 cycleSortOrder ( ) ;
813- return true ;
814809 } else if ( key . sequence === 'r' ) {
815810 state . setSortReverse ( ! state . sortReverse ) ;
816- return true ;
817811 }
818812 // Searching and exit controls.
819813 else if ( key . sequence === '/' ) {
820814 state . setIsSearchMode ( true ) ;
821- return true ;
822815 } else if (
823816 key . sequence === 'q' ||
824817 key . sequence === 'Q' ||
825818 key . name === 'escape'
826819 ) {
827820 onExit ( ) ;
828- return true ;
829821 }
830822 // Delete session control.
831823 else if ( key . sequence === 'x' || key . sequence === 'X' ) {
@@ -855,15 +847,12 @@ export const useSessionBrowserInput = (
855847 ) ;
856848 } ) ;
857849 }
858- return true ;
859850 }
860851 // less-like u/d controls.
861852 else if ( key . sequence === 'u' ) {
862853 moveSelection ( - Math . round ( SESSIONS_PER_PAGE / 2 ) ) ;
863- return true ;
864854 } else if ( key . sequence === 'd' ) {
865855 moveSelection ( Math . round ( SESSIONS_PER_PAGE / 2 ) ) ;
866- return true ;
867856 }
868857 }
869858
@@ -878,21 +867,15 @@ export const useSessionBrowserInput = (
878867 if ( ! selectedSession . isCurrentSession ) {
879868 onResumeSession ( selectedSession ) ;
880869 }
881- return true ;
882870 } else if ( key . name === 'up' ) {
883871 moveSelection ( - 1 ) ;
884- return true ;
885872 } else if ( key . name === 'down' ) {
886873 moveSelection ( 1 ) ;
887- return true ;
888874 } else if ( key . name === 'pageup' ) {
889875 moveSelection ( - SESSIONS_PER_PAGE ) ;
890- return true ;
891876 } else if ( key . name === 'pagedown' ) {
892877 moveSelection ( SESSIONS_PER_PAGE ) ;
893- return true ;
894878 }
895- return false ;
896879 } ,
897880 { isActive : true } ,
898881 ) ;
0 commit comments