-
-
Notifications
You must be signed in to change notification settings - Fork 36
Optimize large shell tool output #275
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
Optimize large shell tool output #275
Conversation
- Auto-allow reading shell output cache files without approval Shell output cache files (~/.cache/eca/*/shell-output/*) are auto-allowed for reading without requiring additional user approval, since the original shell command was already approved.
b1fc834 to
b18b402
Compare
The shell-output-cache-dir-test was checking for ".cache/eca" with forward slashes, but Windows uses backslashes in paths. Normalize to forward slashes for cross-platform compatibility. 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca <noreply@eca.dev>
| input (assoc :in input))))) | ||
|
|
||
| (defn ^:private shell-command [arguments {:keys [db tool-call-id call-state-fn state-transition-fn]}] | ||
| (defn ^:private workspaces-hash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we duplicating this function if it exists in eca.cache/workspaces-hash?
| key (.encodeToString encoder digest)] | ||
| (subs key 0 (min 8 (count key))))) | ||
|
|
||
| (defn ^:private shell-output-cache-dir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this functoin is better to live in eca.cache along with the workspace-cache-file
ericdallo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobrowadam thank you for the help, but I wish we could discuss this better in a issue before a PR, I believe @zikajk has some concerns about this approach
@ericdallo sure no problem. I'll be happy to be part of a discussion regarding optimizing token usage this way or another. |
|
closing this PR for now |
Summary
~/.cache/eca/{workspace-hash}/shell-output/) instead of returning inline. Reduces LLM context bloat for commands likefind,git log, etc.Details
toolCall.shellCommand.outputFileThreshold(default: 1000)