Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| The phone app: Chat in full with phone notifications, plus Code and Customize (#4) | 1 | import { Stack, useLocalSearchParams } from "expo-router"; |
| 2 | ||
| 3 | import { Conversation } from "@/components/chat/conversation"; | |
| 4 | import { Screen } from "@/components/ui"; | |
| 5 | import { useChatSidebar } from "@/lib/chat"; | |
| 6 | ||
| 7 | /** A thread: the message it is under, its replies, and a box to reply in. */ | |
| 8 | export default function ThreadScreen() { | |
| 9 | const { channel, root } = useLocalSearchParams<{ channel: string; root: string }>(); | |
| 10 | const sidebar = useChatSidebar(); | |
| 11 | const entry = sidebar.data?.entries.find((one) => one.channel.id === channel); | |
| 12 | const where = entry ? (entry.channel.kind === "dm" ? entry.title : `#${entry.channel.name}`) : ""; | |
| 13 | return ( | |
| 14 | <Screen> | |
| 15 | <Stack.Screen options={{ title: where ? `Thread in ${where}` : "Thread" }} /> | |
| 16 | <Conversation channelId={channel} thread={root} title={where} /> | |
| 17 | </Screen> | |
| 18 | ); | |
| 19 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.