diff --git a/site/src/pages/TasksPage/TasksPage.tsx b/site/src/pages/TasksPage/TasksPage.tsx index 9f07d0b0c6cdd..30732a3fe035d 100644 --- a/site/src/pages/TasksPage/TasksPage.tsx +++ b/site/src/pages/TasksPage/TasksPage.tsx @@ -1,16 +1,10 @@ import { API } from "api/api"; import { getErrorDetail, getErrorMessage } from "api/errors"; import { disabledRefetchOptions } from "api/queries/util"; -import type { - Template, - Workspace, - WorkspaceAgent, - WorkspaceApp, -} from "api/typesGenerated"; +import type { Template } from "api/typesGenerated"; import { Avatar } from "components/Avatar/Avatar"; import { AvatarData } from "components/Avatar/AvatarData"; import { Button } from "components/Button/Button"; -import { ExternalImage } from "components/ExternalImage/ExternalImage"; import { displayError } from "components/GlobalSnackbar/utils"; import { Margins } from "components/Margins/Margins"; import { @@ -34,23 +28,15 @@ import { TableHeader, TableRow, } from "components/Table/Table"; -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "components/Tooltip/Tooltip"; import { useAuthenticated } from "hooks"; import { ExternalLinkIcon, RotateCcwIcon, SendIcon } from "lucide-react"; -import { useAppLink } from "modules/apps/useAppLink"; import { AI_PROMPT_PARAMETER_NAME, type Task } from "modules/tasks/tasks"; import { WorkspaceAppStatus } from "modules/workspaces/WorkspaceAppStatus/WorkspaceAppStatus"; -import type { FC, PropsWithChildren, ReactNode } from "react"; +import type { FC, ReactNode } from "react"; import { Helmet } from "react-helmet-async"; import { useMutation, useQuery, useQueryClient } from "react-query"; import { Link as RouterLink } from "react-router-dom"; import TextareaAutosize from "react-textarea-autosize"; -import { cn } from "utils/cn"; import { pageTitle } from "utils/page"; import { relativeTime } from "utils/time"; @@ -351,11 +337,6 @@ const TasksTable: FC = ({ templates }) => { src={workspace.owner_avatar_url} /> - - {agent && app && ( - - )} - ); }) @@ -387,7 +368,6 @@ const TasksTable: FC = ({ templates }) => { Task Status Created by - {body} @@ -395,74 +375,6 @@ const TasksTable: FC = ({ templates }) => { ); }; -type IconAppLinkProps = { - app: WorkspaceApp; - workspace: Workspace; - agent: WorkspaceAgent; -}; - -const IconAppLink: FC = ({ app, workspace, agent }) => { - const link = useAppLink(app, { - workspace, - agent, - }); - - return ( - { - link.onClick?.(e); - e.stopPropagation(); - }} - > - - - ); -}; - -type BaseIconLinkProps = PropsWithChildren<{ - label: string; - href: string; - isLoading?: boolean; - target?: string; - onClick?: (e: React.MouseEvent) => void; -}>; - -const BaseIconLink: FC = ({ - href, - isLoading, - label, - children, - target, - onClick, -}) => { - return ( - - - - - - {label} - - - ); -}; - export const data = { // TODO: This function is currently inefficient because it fetches all templates // and their parameters individually, resulting in many API calls and slow