Skip to content

Commit 648752b

Browse files
committed
Give username system message its own bullet
and remove from cwd try..except.
1 parent a30c45f commit 648752b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

interpreter/interpreter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ def default_system_message(self):
200200
print("Error adding system capability for date")
201201

202202
try:
203-
cwd_line = f"* The user's cwd is {os.getcwd()}"
204-
try:
205-
cwd_line += f" and username is {os.getlogin()}"
206-
except:
207-
print("Error adding system capability for username")
208-
system_message += cwd_line + "\n"
203+
system_message += f"* The user's cwd is {os.getcwd()}"
209204
except:
210205
print("Error adding system capability for cwd")
211206

207+
try:
208+
system_message += f"* The username is {os.getlogin()}.\n"
209+
except:
210+
print("Error adding system capability for username")
211+
212212
system_message += "</SYSTEM_CAPABILITY>"
213213

214214
# Add web search capability if enabled

0 commit comments

Comments
 (0)