Skip to content

Commit 7b12b5c

Browse files
committed
Improved i shortcut, print in debug mode
1 parent 624d14d commit 7b12b5c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

interpreter/terminal_interface/start_terminal_interface.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import os
23
import sys
34
import time
45

@@ -289,13 +290,24 @@ def start_terminal_interface(interpreter):
289290
},
290291
]
291292

293+
# i shortcut
292294
if len(sys.argv) > 1 and not sys.argv[1].startswith("-"):
293295
message = " ".join(sys.argv[1:])
294296
interpreter.messages.append(
295297
{"role": "user", "type": "message", "content": "I " + message}
296298
)
297299
sys.argv = sys.argv[:1]
298300

301+
interpreter.custom_instructions = "UPDATED INSTRUCTIONS: You are in ULTRA FAST, ULTRA CERTAIN mode. Do not ask the user any questions or run code to gathet information. Go as quickly as you can. Run code quickly. Do not plan out loud, simply start doing the best thing. The user expects speed. Trust that the user knows best. Just interpret their ambiguous command as quickly and certainly as possible and try to fulfill it IN ONE COMMAND, assuming they have the right information. If they tell you do to something, just do it quickly in one command, DO NOT try to get more information (for example by running `cat` to get a file's infomration— this is probably unecessary!). DIRECTLY DO THINGS AS FAST AS POSSIBLE."
302+
303+
files_in_directory = os.listdir()[:100]
304+
interpreter.custom_instructions += (
305+
"\nThe files in CWD, which THE USER MAY BE REFERRING TO, are: "
306+
+ ", ".join(files_in_directory)
307+
)
308+
309+
# interpreter.debug = True
310+
299311
# Check for deprecated flags before parsing arguments
300312
deprecated_flags = {
301313
"--debug_mode": "--verbose",

0 commit comments

Comments
 (0)