File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -242,9 +242,13 @@ def chat(
242
242
), f"Workspace path { workspace_path } does not exist"
243
243
os .chdir (workspace_path )
244
244
245
- # check if workspace already exists
246
245
workspace_prompt = get_workspace_prompt (str (workspace_path ))
247
- if workspace_prompt :
246
+ # check if message is already in log, such as upon resume
247
+ if (
248
+ workspace_prompt
249
+ and workspace_prompt not in [m .content for m in log ]
250
+ and "user" not in [m .role for m in log ]
251
+ ):
248
252
log .append (Message ("system" , workspace_prompt , hide = True ))
249
253
250
254
# print log
@@ -256,7 +260,8 @@ def chat(
256
260
# if prompt_msgs given, insert next prompt into log
257
261
if prompt_msgs :
258
262
msg = prompt_msgs .pop (0 )
259
- msg = _include_paths (msg )
263
+ if not msg .content .startswith ("/" ):
264
+ msg = _include_paths (msg )
260
265
log .append (msg )
261
266
# if prompt is a user-command, execute it
262
267
if execute_cmd (msg , log ):
You can’t perform that action at this time.
0 commit comments