import type { MemShellResult } from "@/types/memshell"; import { ScrollTextIcon } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; import { downloadBytes, formatBytes } from "@/lib/utils"; export function AgentResult({ packMethod, packResult, generateResult, }: Readonly<{ packMethod: string; packResult: string; generateResult?: MemShellResult; }>) { const { t } = useTranslation(["common"]); const isPureAgent = packMethod === "AgentJar"; return ( {t("common:usage")}
  1. {t("common:download")} MemShellAgent.jar ({formatBytes(atob(packResult).length)})
  2. {isPureAgent && (
  3. {t("memshell:tips.download-jattach")}
  4. )}
  5. {isPureAgent ? t("memshell:tips.agent-move-to-target") : t("memshell:tips.agent-move-to-target1")}
  6. {t("memshell:tips.get-pid")}
  7. {isPureAgent ? t("memshell:tips.execute-command") : t("memshell:tips.execute-command1")}
  8. {t("memshell:tips.try-to-use-shell")}
); }