File tree Expand file tree Collapse file tree 4 files changed +29
-9
lines changed
Expand file tree Collapse file tree 4 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ export default function TasksScreen() {
77 const { cloudRegion, projectId } = useAuthStore ( ) ;
88
99 const handleCreateTask = ( ) => {
10+ router . push ( "/agent" ) ;
11+ } ;
12+
13+ const handleChatWithAI = ( ) => {
1014 router . push ( "/chat" ) ;
1115 } ;
1216
@@ -24,13 +28,23 @@ export default function TasksScreen() {
2428 { /* Create New Task Button */ }
2529 < Pressable
2630 onPress = { handleCreateTask }
27- className = "mb-6 items-center rounded-xl bg-orange-500 py-4 active:bg-orange-600"
31+ className = "mb-4 items-center rounded-xl bg-orange-500 py-4 active:bg-orange-600"
2832 >
2933 < Text className = "font-semibold text-base text-white" >
3034 Create new task
3135 </ Text >
3236 </ Pressable >
3337
38+ { /* Chat with PostHog AI Button */ }
39+ < Pressable
40+ onPress = { handleChatWithAI }
41+ className = "mb-6 items-center rounded-xl bg-blue-600 py-4 active:bg-blue-700"
42+ >
43+ < Text className = "font-semibold text-base text-white" >
44+ Chat with PostHog AI
45+ </ Text >
46+ </ Pressable >
47+
3448 { /* Info Card */ }
3549 < View className = "mb-6 rounded-xl bg-dark-surface p-4" >
3650 < View className = "flex-row justify-between py-2" >
Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ function RootLayoutNav() {
4444 headerTintColor : "#fff" ,
4545 } }
4646 />
47+ < Stack . Screen
48+ name = "agent"
49+ options = { {
50+ headerShown : true ,
51+ } }
52+ />
4753 </ Stack >
4854 ) ;
4955}
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ import {
1616 getIntegrations ,
1717 getTasks ,
1818 runTaskInCloud ,
19- } from "../../ features/agent/lib/agentApi" ;
20- import type { Integration , Task } from "../../ features/agent/types/agent" ;
19+ } from "../features/agent/lib/agentApi" ;
20+ import type { Integration , Task } from "../features/agent/types/agent" ;
2121
2222export default function AgentScreen ( ) {
2323 const router = useRouter ( ) ;
@@ -105,7 +105,7 @@ export default function AgentScreen() {
105105 setPrompt ( "" ) ;
106106 setSelectedRepo ( null ) ;
107107
108- router . push ( `/(auth)/ agent/${ task . id } ` ) ;
108+ router . push ( `/agent/${ task . id } ` ) ;
109109 } catch ( error ) {
110110 console . error ( "Failed to create task:" , error ) ;
111111 } finally {
@@ -115,7 +115,7 @@ export default function AgentScreen() {
115115
116116 const renderTask = useCallback (
117117 ( { item } : { item : Task } ) => (
118- < Link href = { `/(auth)/ agent/${ item . id } ` } asChild >
118+ < Link href = { `/agent/${ item . id } ` } asChild >
119119 < Pressable className = "bg-neutral-800 rounded-xl p-4 mb-3" >
120120 < Text className = "text-white font-medium mb-1" numberOfLines = { 2 } >
121121 { item . title || item . description }
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ import { useLocalSearchParams, useRouter } from "expo-router";
22import { useCallback , useEffect , useState } from "react" ;
33import { ActivityIndicator , Pressable , Text , View } from "react-native" ;
44import { SafeAreaView } from "react-native-safe-area-context" ;
5- import { AgentSessionView } from "../../../ features/agent/components/AgentSessionView" ;
6- import { getTask } from "../../../ features/agent/lib/agentApi" ;
7- import { useAgentSessionStore } from "../../../ features/agent/stores/agentSessionStore" ;
8- import type { Task } from "../../../ features/agent/types/agent" ;
5+ import { AgentSessionView } from "../../features/agent/components/AgentSessionView" ;
6+ import { getTask } from "../../features/agent/lib/agentApi" ;
7+ import { useAgentSessionStore } from "../../features/agent/stores/agentSessionStore" ;
8+ import type { Task } from "../../features/agent/types/agent" ;
99
1010export default function TaskDetailScreen ( ) {
1111 const { taskId } = useLocalSearchParams < { taskId : string } > ( ) ;
You can’t perform that action at this time.
0 commit comments