Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rlm/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"pydantic",
)

SHELL_TOOL_NAMES = frozenset({"ipython"})
SHELL_TOOL_NAMES = frozenset({"bash", "ipython"})
GIT_HISTORY_GUARD_PROMPT = (
"Do not cheat by using online solutions or hints specific to this task, or "
"by copying or inferring solutions from other branches, tags, remotes, "
Expand Down
15 changes: 8 additions & 7 deletions tests/test_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ def _prompt(


def test_git_history_guard_prompt_included_for_shell_tools():
prompt = _prompt([_Tool("ipython")])

assert GIT_HISTORY_GUARD_PROMPT in prompt
assert "Do not cheat" in prompt
assert "online solutions or hints specific to this task" in prompt
assert "other branches, tags, remotes" in prompt
assert "`--all`" in prompt
for tool in ("ipython", "bash"):
prompt = _prompt([_Tool(tool)])

assert GIT_HISTORY_GUARD_PROMPT in prompt
assert "Do not cheat" in prompt
assert "online solutions or hints specific to this task" in prompt
assert "other branches, tags, remotes" in prompt
assert "`--all`" in prompt


def test_git_history_guard_prompt_omitted_when_unrestricted():
Expand Down
Loading