refactor(frontend): extract agent payload and ReActStep mapping helpers#5995
Draft
Ma77Ball wants to merge 2 commits into
Draft
refactor(frontend): extract agent payload and ReActStep mapping helpers#5995Ma77Ball wants to merge 2 commits into
Ma77Ball wants to merge 2 commits into
Conversation
added a mapper convertApireActSteps... helper function to handle agent get and create calls
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5995 +/- ##
============================================
+ Coverage 56.23% 56.85% +0.61%
Complexity 2987 2987
============================================
Files 1120 1123 +3
Lines 43167 43522 +355
Branches 4658 4705 +47
============================================
+ Hits 24274 24743 +469
+ Misses 17472 17304 -168
- Partials 1421 1475 +54
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this PR?
mapApiAgentInfo(api)helper inAgentServiceand routedcreateAgent,getAgent, andgetAllAgentsthrough it, removing three identical inlineApiAgentInfo -> AgentInfomappings (including the duplicateddelegatesub-mapping).convertApiReActSteps(steps)helper and routed the threesteps.map(s => convertApiReActStep(s))sites through it.AgentInfoandReActStep[]values are identical to before.Any related issues, documentation, discussions?
Closes: #5990
How was this PR tested?
cd frontend && yarn test --include='**/agent.service.spec.ts', expect the existingAgentServicesuite (including thecreateAgentcases that flush an API payload and assert the mappedAgentInfo) to pass.cd frontend && npx tsc --noEmit -p tsconfig.json, expect no errors inagent.service.ts(the only error is a pre-existing unrelated missing-module inmigration-llm.ts).Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF