"use client"; import type { ReactNode } from "react"; import { toRelativePath } from "@/lib/utils"; import { ExternalVcsFileLink, useExternalVcsFileStatus, } from "@/components/editors/external-vcs-file-link"; type FileViewerHeaderProps = { path: string; worktreePath?: string; actions?: ReactNode; }; export function FileViewerHeader({ path, worktreePath, actions }: FileViewerHeaderProps) { const label = toRelativePath(path, worktreePath); if (!actions) { return (
{label}
); } return (
{label}
{actions}
); } type FileViewerExternalLinkProps = { path: string; sessionId?: string | null; taskId?: string | null; repositoryId?: string | null; repositoryName?: string; }; export function FileViewerExternalLink({ path, sessionId, taskId, repositoryId, repositoryName, }: FileViewerExternalLinkProps) { const fileStatus = useExternalVcsFileStatus(path, sessionId, repositoryName); return ( ); }