apache / apache/texera

Deduplicate agent payload and ReActStep mapping in AgentService

Open
#5,990 0 comments 0 reactions 1 assignee Claimed by @Ma77Ball View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

### Task Summary
In `agent.service.ts`, the `ApiAgentInfo -> AgentInfo` object mapping (including the `delegate` sub-mapping) was inlined identically in `createAgent`, `getAgent`, and `getAllAgents`, and the `steps.map(s => convertApiReActStep(s))` array conversion was inlined in three more places. This extracts two private helpers, `mapApiAgentInfo` and `convertApiReActSteps`, and routes the six call sites through them. Behavior is unchanged.
### Task Type
- [x] Refactor

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.