import { useChatOverlay } from '../contexts/ChatOverlayContext'
import ChatOverlayShell from './ChatOverlayShell'
import SkillSandboxPage from '../pages/SkillSandboxPage'

export default function SandboxOverlay() {
  const { closeOverlay, overlayProps } = useChatOverlay()
  const skillId = overlayProps?.skillId

  return (
    <ChatOverlayShell title="运行" onClose={closeOverlay}>
      <SkillSandboxPage overlayMode={true} overlaySkillId={skillId} />
    </ChatOverlayShell>
  )
}
