@@ -48,12 +48,18 @@ type Props = {
4848
4949export const Home : React . FC < Props > = ( props ) => {
5050 const { t } = use_translation ( )
51- const [ active_tab , set_active_tab ] = useState < 'tasks' | 'checkpoints' > ( 'tasks' )
51+ const [ active_tab , set_active_tab ] = useState < 'tasks' | 'checkpoints' > (
52+ 'tasks'
53+ )
5254 const [ active_workspace_root , set_active_workspace_root ] = useState < string > ( )
53- const { is_mode_sticky, is_hiding, responses_ref, mode_ref, handle_scroll } = use_sticky_mode ( )
55+ const { is_mode_sticky, is_hiding, responses_ref, mode_ref, handle_scroll } =
56+ use_sticky_mode ( )
5457
5558 const roots = Object . keys ( props . tasks )
56- const active_root = active_workspace_root && roots . includes ( active_workspace_root ) ? active_workspace_root : roots [ 0 ]
59+ const active_root =
60+ active_workspace_root && roots . includes ( active_workspace_root )
61+ ? active_workspace_root
62+ : roots [ 0 ]
5763
5864 useEffect ( ( ) => {
5965 const handle_mouse_up = ( event : MouseEvent ) => {
@@ -165,7 +171,9 @@ export const Home: React.FC<Props> = (props) => {
165171 { id : 'checkpoints' , label : t ( 'home.checkpoints' ) }
166172 ] }
167173 active_tab = { active_tab }
168- on_tab_change = { ( id ) => set_active_tab ( id as 'tasks' | 'checkpoints' ) }
174+ on_tab_change = { ( id ) =>
175+ set_active_tab ( id as 'tasks' | 'checkpoints' )
176+ }
169177 actions = {
170178 active_tab == 'tasks' ? (
171179 < >
@@ -178,6 +186,7 @@ export const Home: React.FC<Props> = (props) => {
178186 } ) ) }
179187 selected_value = { active_root ! }
180188 on_change = { ( val ) => set_active_workspace_root ( val ) }
189+ info = { t ( 'home.folder' ) }
181190 />
182191 </ div >
183192 ) }
@@ -188,7 +197,11 @@ export const Home: React.FC<Props> = (props) => {
188197 on_click = { ( e ) => {
189198 e . stopPropagation ( )
190199 if ( active_root ) {
191- handle_add ( active_root , props . tasks [ active_root ] , 'top' )
200+ handle_add (
201+ active_root ,
202+ props . tasks [ active_root ] ,
203+ 'top'
204+ )
192205 }
193206 } }
194207 />
@@ -249,13 +262,21 @@ export const Home: React.FC<Props> = (props) => {
249262 handle_reorder ( active_root , new_tasks )
250263 }
251264 on_change = { ( updated_task ) => {
252- handle_change ( active_root , props . tasks [ active_root ] , updated_task )
265+ handle_change (
266+ active_root ,
267+ props . tasks [ active_root ] ,
268+ updated_task
269+ )
253270 } }
254271 on_add = { ( ) => {
255272 handle_add ( active_root , props . tasks [ active_root ] )
256273 } }
257274 on_add_subtask = { ( parent_task ) => {
258- handle_add_subtask ( active_root , props . tasks [ active_root ] , parent_task )
275+ handle_add_subtask (
276+ active_root ,
277+ props . tasks [ active_root ] ,
278+ parent_task
279+ )
259280 } }
260281 on_delete = { ( timestamp ) => {
261282 handle_delete ( active_root , timestamp )
@@ -277,7 +298,9 @@ export const Home: React.FC<Props> = (props) => {
277298 < UiCheckpoints
278299 items = { props . checkpoints . map ( ( c ) => ( {
279300 id : c . timestamp ,
280- label : t ( `command.checkpoints.trigger.${ c . trigger } ` as any ) ,
301+ label : t (
302+ `command.checkpoints.trigger.${ c . trigger } ` as any
303+ ) ,
281304 timestamp : c . timestamp ,
282305 description : c . description ,
283306 is_starred : c . is_starred ,
@@ -315,7 +338,6 @@ export const Home: React.FC<Props> = (props) => {
315338 </ div >
316339 </ div >
317340 </ UiScrollable >
318-
319341 </ >
320342 )
321343}
0 commit comments