From 94f0d96654bb222b5dc4a40b1da1f142912da327 Mon Sep 17 00:00:00 2001 From: AI Christianson Date: Wed, 12 Feb 2025 15:26:36 -0500 Subject: [PATCH] lower interactive shell history to conserve context; improve prompts --- ra_aid/proc/interactive.py | 2 +- ra_aid/prompts.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ra_aid/proc/interactive.py b/ra_aid/proc/interactive.py index 23f6d3a..e4917ba 100644 --- a/ra_aid/proc/interactive.py +++ b/ra_aid/proc/interactive.py @@ -56,7 +56,7 @@ def run_interactive_command(cmd: List[str]) -> Tuple[bytes, int]: cols, rows = 80, 24 # Instantiate HistoryScreen with a large history (scrollback) buffer. - screen = HistoryScreen(cols, rows, history=15000, ratio=0.5) + screen = HistoryScreen(cols, rows, history=2000, ratio=0.5) stream = pyte.Stream(screen) # Open a new pseudo-tty. diff --git a/ra_aid/prompts.py b/ra_aid/prompts.py index 65f1508..372cf6e 100644 --- a/ra_aid/prompts.py +++ b/ra_aid/prompts.py @@ -570,6 +570,8 @@ Guidelines: If relevant tests have not already been run, run them using run_shell_command to get a baseline of functionality (e.g. were any tests failing before we started working? Do they all pass?) Only test UI components if there is already a UI testing system in place. Only test things that can be tested by an automated process. + + Are you writing a program that needs to be compiled? Make sure it compiles, if relevant. After finalizing the overall approach: Use emit_plan to store the high-level implementation plan. @@ -630,6 +632,9 @@ Testing: - Only test UI components if there is already a UI testing system in place. - Only test things that can be tested by an automated process. +- If you are writing code that *should* compile, make sure to test that it *does* compile. + +Test before and after making changes, if relevant. Once the task is complete, ensure all updated files are registered with emit_related_files. @@ -975,5 +980,7 @@ You have often been criticized for: {initial_request} +Remember, if you do not make any tool call (e.g. ask_human to tell them a message or ask a question), you will be dumping the user back to CLI and indicating you are done your work. + NEVER ANNOUNCE WHAT YOU ARE DOING, JUST DO IT! """