import { CreateScriptResponse, isShellRuntime, getSourceCommand } from '../types' import CommandCard from './CommandCard' interface Props { result: CreateScriptResponse onReset: () => void } export default function ResultCard({ result, onReset }: Props) { const detailUrl = `${window.location.origin}/s/${result.id}` const showSource = isShellRuntime(result.runtime) const sourceCommand = showSource ? getSourceCommand(result.url, result.runtime) : null return (
如果脚本设置了环境变量(如代理),请使用以下命令在当前 shell 中执行: