-
Notifications
You must be signed in to change notification settings - Fork 6
refactor(agents): improve writeAgents with file-level tracking #228
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ee42a0d
refactor(agents): improve writeAgents with file-level tracking and sk…
Paveltarno d992c00
fix(agents): remove early return in pull command when remote is empty
Paveltarno e74910b
style: apply biome lint fixes
github-actions[bot] d7d5680
fix(tests): update agents pull test expectations to match new messages
Paveltarno 8b02c4e
fix: remove unused toFileSlug function
Paveltarno fee405f
style: fix trailing commas in agents write tests
Paveltarno 6b0fa71
test(agents): add CLI-level pull tests with fixture and file assertions
github-actions[bot] 7d1f297
test(agents): add naming clash test and fix for custom-filename colli…
github-actions[bot] c2b4866
fix(agents): handle filename collisions gracefully on pull
Paveltarno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we create a fixture and also add a test that starts from the cli? and then check everything worked fine
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.
@claude please (:
Uh oh!
There was an error while loading. Please reload this page.
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.
Claude finished @Paveltarno's task in 4m 59s —— View job
CLI fixture and integration tests added
with-agents-for-pullfixture with existing agent fileWhat was added
New fixture
tests/fixtures/with-agents-for-pull/:base44/.app.jsonc,base44/config.jsonc— standard project structurebase44/agents/support_agent.jsonc— agent file with a// My support agentJSONC comment (used to detect rewrites)Three new tests in
tests/cli/agents_pull.spec.ts:writes agent files to disk after pullbasicbase44/agents/support_agent.jsoncwith correctname,description,instructionsskips unchanged agents and preserves file contentwith-agents-for-pullupdates agent file in-place when remote data changeswith-agents-for-pullThere 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.
@claude, thank you, just add another test for when there's a file naming clash
Uh oh!
There was an error while loading. Please reload this page.
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.
Claude finished @Paveltarno's task in 4m 46s —— View job
Naming clash test added
writeAgentsto detect file naming clasheswith-agents-naming-clashfixtureWhat was added
New fixture
tests/fixtures/with-agents-naming-clash/:base44/agents/custom_name.jsonc— agent stored with a custom filename butname: "support_agent"Bug fix in
src/core/resources/agent/config.ts(writeAgents):Before this PR, if a remote returned both
support_agent(written to the existingcustom_name.jsonc) and a new agent namedcustom_name(whose default path would also becustom_name.jsonc), the new agent would silently overwrite the first. Now it throws:New test in
tests/cli/agents_pull.spec.ts:View commit |