-
Notifications
You must be signed in to change notification settings - Fork 7k
fix: Agentskills enhancements #2384
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
Conversation
…into agent-fileops
…into agent-fileops
cc @neubig @li-boxuan Kindly ask for a review and "Workflows" unlock, to see if test run fine on CI. |
Working on more fixes... |
chugging away... |
@li-boxuan I did update my branch to current main (cherry-picked those 4 last commits), but still see branch conflicts about deleted log files. Would appreciate, if you could lend a hand on this issue. Thank you! 🤗 |
@tobitege I cannot directly push to your branch, but I can share what I did:
|
Thanks a lot! Will try that now. |
Fantastic, that worked! Ready for review then. 🍰 |
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.
Mostly LGTM! Thanks for doing this!! I think agentskills
get a little bit more robust day to day thanks to your contribution :)
tests/integration/mock/CodeActSWEAgent/test_ipython_module/prompt_002.log
Outdated
Show resolved
Hide resolved
* updated docstrings with more details for LLM * fix legacy typo in prompts causing ]] instead of ] * several mock files regenerated
@xingyaoww latest commit should address all raised issues; even found another bug I was able to fix in between. Might be a legacy issue here (with LLM): |
Hmm seems I missed to regen an integration test. Will fix asap. |
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.
Thanks so much for this, it seems this will make things much more solid! I have left a bunch of comments, please re-request review when you have handled them.
Auxiliary comment not related to this PR in particular, but agentskills more in general: I was confused by print()
. It seems that it's clearly not just for writing to the terminal, but rather it's functioning more like return
. But this isn't documented anywhere in the python file comments. It'd be good to add a comment about this at the top of the file. Also, maybe we should consider using return
instead of print
to make this more like canonical Python? It doesn't need to be fixed in this PR, but maybe we could open an issue about it.
Also, one request for the future -- this PR is rather large which caused reviewing it to take a significant amount of time. If possible, you can also split into somewhat smaller PRs to reduce the reviewing burden somewhat and allow us to have faster turnaround on reviews. Thanks a lot!
Thanks so much for taking the time reviewing this (grown) PR! |
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.
Looks great, thanks!
Should fix: #1890 [Bug]: CodeAct repeatedly edits the wrong file
Followup to: #2346 feat: append_file incl. all tests
agentskills.py updated: append_file, edit_file, open_file, _print_window revised/refactored
test_agent_skill.py unit tests partially refactored and updated
updated CodeActAgent prompts for new signatures; added system prompt words for file handling.
test_agent.py integration tests retested
couple more revisions to docs
CodeActSWEAgent: only updated method signatures for agent skills
The
open_file
method got a new int parametercontext_lines
(default: 100) which allows the agent to get smaller or bigger text chunks of up to 2000 lines (I made the decision for that cap, agent can still use scroll methods)The
append_file
andedit_file
methods are basically stumps now to call an internal method that combines both functionalities (bool isAppend parameter).Revised the _print_window method to handle "edge" cases better and keep the current line centered if possible
Made sure that empty files are handled better, i.e. line count is 1, not 0; we get 1-based lines back from the linter, so 1-based is preferably