open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Clarify CWD and timestamp to AI

Open endolith opened this issue 11 months ago • 4 comments

Describe the changes you have made:

CWD in system message does not update as AI changes folders, but the time does stay up to date.

Add time, not just date.

Put username on its own line and remove from cwd try..except.

Reference any relevant issues (e.g. "Fixes #000"):

Pre-Submission Checklist (optional but appreciated):

  • [ ] I have included relevant documentation updates (stored in /docs)
  • [x] I have read docs/CONTRIBUTING.md
  • [x] I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • [x] Tested on Windows
  • [ ] Tested on MacOS
  • [x] Tested on Linux

endolith avatar Mar 25 '25 02:03 endolith

whether the CWD is accurate or not actually depends on which bash tool is used? I now realize there are two bash tools: simple_bash.py which cannot change folders, and bash.py which can, so the message could just say "OI was started in this folder, which may not match the folder within tools" or something like that.

ideally the bash tool which can change folders would tell the AI which folder it's actually in with every user message, so it doesn't get lost (possibly by just showing the AI the actual prompt and last output?).

endolith avatar Mar 25 '25 15:03 endolith

I changed this to a draft, since "Currently the bash environment is non-interactive" is dependent on the tools enabled. I will revise it

endolith avatar Mar 28 '25 15:03 endolith

OK I made the CWD message more accurate and split it up into multiple commits for readability

endolith avatar Mar 29 '25 03:03 endolith

Also I realized that including a timestamp in the system message would invalidate token caching and waste money. I would prefer that the timestamp be included with each user message anyway, and not in system message.

endolith avatar Mar 30 '25 21:03 endolith