diff --git a/packages/treebeard/src/components/LaunchButtons.tsx b/packages/treebeard/src/components/LaunchButtons.tsx index d5c91be..64d4a9a 100644 --- a/packages/treebeard/src/components/LaunchButtons.tsx +++ b/packages/treebeard/src/components/LaunchButtons.tsx @@ -1,6 +1,5 @@ -import { useEffect, useState } from 'react' import { ActionIcon, Group, Tooltip } from '@mantine/core' -import { IconGhost, IconPrison } from '@tabler/icons-react' +import { IconCopy, IconGhost } from '@tabler/icons-react' import { IdeIcon } from './IdeIcon' import { IDE_REGISTRY } from '../shared/ide-registry' import { rpc } from '../rpc' @@ -13,30 +12,6 @@ interface LaunchButtonsProps { export function LaunchButtons({ worktreePath, defaultIde }: LaunchButtonsProps) { const ide = IDE_REGISTRY[defaultIde] - const [pippinPath, setPippinPath] = useState(null) - - useEffect(() => { - let cancelled = false - - const loadPippinPath = async () => { - try { - const result = await rpc().request['system:pippinPath']({}) - if (!cancelled) { - setPippinPath(result) - } - } catch { - if (!cancelled) { - setPippinPath(null) - } - } - } - - void loadPippinPath() - - return () => { - cancelled = true - } - }, []) const handleIde = async () => { await rpc().request['launch:ide']({ ideId: defaultIde, worktreePath }) @@ -46,8 +21,8 @@ export function LaunchButtons({ worktreePath, defaultIde }: LaunchButtonsProps) await rpc().request['launch:ghostty']({ worktreePath }) } - const handlePippinShell = async () => { - await rpc().request['launch:pippinShell']({ worktreePath }) + const handleCopyPath = () => { + void navigator.clipboard.writeText(worktreePath) } return ( @@ -62,13 +37,11 @@ export function LaunchButtons({ worktreePath, defaultIde }: LaunchButtonsProps) - {pippinPath && ( - - - - - - )} + + + + + ) }