@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 03:37 UTC

main
ts 14 lines 613 Bytes
Raw
1 import { useGT } from "gt-react-native";
2
3 import { useAdaptiveWorkspaceLayout } from "../adaptive-workspace-context";
4 import { useWorkspaceTabs } from "./WorkspaceTabsContext";
5
6 /** What the compose button starts on the selected tab; null where the tab has nothing to start. */
7 export function useWorkspaceCompose() {
8 const gt = useGT();
9 const workspace = useWorkspaceTabs();
10 const { startNewTask } = useAdaptiveWorkspaceLayout();
11 if (!workspace || workspace.settingsOpen || workspace.state.selectedTab !== "threads")
12 return null;
13 return { label: gt("New chat"), onPress: startNewTask } as const;
14 }