@@ -40,7 +40,6 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
4040 const {
4141 getTaskState,
4242 setRunMode : setStoreRunMode ,
43- selectRepositoryForTask,
4443 runTask,
4544 cancelTask,
4645 clearTaskLogs,
@@ -184,12 +183,6 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
184183
185184 useBlurOnEscape ( ) ;
186185
187- // Simple event handlers that delegate to store actions
188- const handleSelectRepo = ( ) => {
189- const repoKey = repositoryValue || undefined ;
190- selectRepositoryForTask ( task . id , repoKey ) ;
191- } ;
192-
193186 const handleRunTask = ( ) => {
194187 runTask ( task . id , task ) ;
195188 } ;
@@ -361,25 +354,14 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
361354 < DataList . Label > Working Directory</ DataList . Label >
362355 < DataList . Value >
363356 { repoPath ? (
364- < Button
365- size = "1"
366- variant = "outline"
367- color = "gray"
368- onClick = { handleSelectRepo }
369- >
357+ < Button size = "1" variant = "outline" color = "gray" >
370358 < FilesIcon />
371359 { displayRepoPath }
372360 </ Button >
373361 ) : (
374- < Button
375- size = "1"
376- variant = "outline"
377- color = "gray"
378- onClick = { handleSelectRepo }
379- >
380- < FilesIcon />
381- Choose folder
382- </ Button >
362+ < Text size = "2" color = "gray" >
363+ Not set
364+ </ Text >
383365 ) }
384366 </ DataList . Value >
385367 </ DataList . Item >
@@ -419,41 +401,35 @@ export function TaskDetail({ task: initialTask }: TaskDetailProps) {
419401 </ Flex >
420402
421403 < Flex direction = "column" gap = "3" mt = "4" >
422- { ! repoPath ? (
423- < Button variant = "classic" onClick = { handleSelectRepo } size = "2" >
424- Choose working folder
404+ < Flex gap = "2" >
405+ < Button
406+ variant = "classic"
407+ onClick = { handleRunTask }
408+ disabled = { isRunning }
409+ size = "2"
410+ style = { { flex : 1 } }
411+ >
412+ { isRunning
413+ ? "Running..."
414+ : runMode === "cloud"
415+ ? "Run Agent"
416+ : "Run Agent (Local)" }
425417 </ Button >
426- ) : (
427- < Flex gap = "2" >
428- < Button
429- variant = "classic"
430- onClick = { handleRunTask }
431- disabled = { isRunning }
418+ < Tooltip content = "Toggle between Local or Cloud Agent" >
419+ < IconButton
432420 size = "2"
433- style = { { flex : 1 } }
421+ variant = "classic"
422+ color = { runMode === "cloud" ? "blue" : "gray" }
423+ onClick = { ( ) =>
424+ handleRunModeChange (
425+ runMode === "local" ? "cloud" : "local" ,
426+ )
427+ }
434428 >
435- { isRunning
436- ? "Running..."
437- : runMode === "cloud"
438- ? "Run Agent"
439- : "Run Agent (Local)" }
440- </ Button >
441- < Tooltip content = "Toggle between Local or Cloud Agent" >
442- < IconButton
443- size = "2"
444- variant = "classic"
445- color = { runMode === "cloud" ? "blue" : "gray" }
446- onClick = { ( ) =>
447- handleRunModeChange (
448- runMode === "local" ? "cloud" : "local" ,
449- )
450- }
451- >
452- { runMode === "cloud" ? < GlobeIcon /> : < GearIcon /> }
453- </ IconButton >
454- </ Tooltip >
455- </ Flex >
456- ) }
429+ { runMode === "cloud" ? < GlobeIcon /> : < GearIcon /> }
430+ </ IconButton >
431+ </ Tooltip >
432+ </ Flex >
457433
458434 { isRunning && (
459435 < Button
0 commit comments