Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify CWD and timestamp to AI #1607

Draft
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

endolith
Copy link

@endolith endolith commented Mar 25, 2025

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)
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • Tested on Windows
  • Tested on MacOS
  • Tested on Linux

@endolith
Copy link
Author

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?).

@Notnaton Notnaton mentioned this pull request Mar 25, 2025
6 tasks
@Notnaton Notnaton self-assigned this Mar 25, 2025
@endolith endolith marked this pull request as draft March 28, 2025 15:11
@endolith
Copy link
Author

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 endolith force-pushed the timestamp_cwd branch 2 times, most recently from 2048fcd to 34dc44d Compare March 29, 2025 03:40
@endolith endolith marked this pull request as ready for review March 29, 2025 03:42
@endolith
Copy link
Author

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

and remove from cwd try..except
and put in quotes
and clarify that it is updated with every user message.
CWD in system message does not update as AI changes folders (in tools
that support changing folders).

Also put path in quotes in case it has spaces.
@endolith
Copy link
Author

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 endolith marked this pull request as draft March 30, 2025 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants