import type { ProbeShellResult, ResponseBodyConfig } from "@/types/probeshell"; import { FileTextIcon } from "lucide-react"; import { useTranslation } from "react-i18next"; import { CopyableField } from "@/components/copyable-field"; import { FeedbackAlert } from "@/components/memshell/results/feedback-alert"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; export function BasicInfo({ generateResult }: Readonly<{ generateResult?: ProbeShellResult }>) { const { t } = useTranslation(); const isBodyContent = generateResult?.probeConfig.probeMethod === "ResponseBody"; const isFilterContent = generateResult?.probeConfig.probeContent === "Filter"; const isBodyCommand = isBodyContent && generateResult?.probeConfig.probeContent === "Command"; return (
{t("common:basicInfo")}
{!isFilterContent && isBodyContent && ( )} {isBodyCommand && (generateResult?.probeContentConfig as ResponseBodyConfig).commandTemplate && ( )}
); }