# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """Custom Gradio terminal UI for the Terminus environment.""" from __future__ import annotations from typing import Any, Optional import gradio as gr COMMAND_EXAMPLES = { "Inspect workspace": "pwd && ls -la", "Create answer file": "mkdir -p /home/user/work && echo done > /home/user/work/answer.txt", "Run Python": "python - <<'PY'\nprint('hello from the sandbox')\nPY", "Install package": "pip install -q pytest", "Run tests": "pytest -q", } DEFAULT_SETUP = "mkdir -p /home/user/work" DEFAULT_VERIFY = "test -f /home/user/work/answer.txt" _STYLE = """ """ _EMPTY_TERMINAL = ( "