Skip to content

Commit 6242e48

Browse files
authored
Merge pull request #733 from AnguseZhang/fix/step_description
refactor: 改用常量STEP_DESCRIPTION增强代码可读性和维护性
2 parents f9cce74 + a464219 commit 6242e48

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • agents/matmaster_agent/flow_agents/execution_agent

agents/matmaster_agent/flow_agents/execution_agent/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ async def _prepare_retry_fake_success(
266266
update_plan = copy.deepcopy(ctx.session.state['plan'])
267267
update_plan['steps'][index]['status'] = PlanStepStatusEnum.PROCESS
268268
update_plan['steps'][index]['validation_failure_reason'] = validation_reason
269-
original_description = ctx.session.state[PLAN]['steps'][index]['description']
269+
original_description = ctx.session.state[PLAN]['steps'][index][STEP_DESCRIPTION]
270270
update_plan['steps'][index][
271-
'description'
271+
STEP_DESCRIPTION
272272
] = f"{original_description}\n\n注意:上次执行因以下原因校验失败,请改进:{validation_reason}"
273273
yield update_state_event(ctx, state_delta={'plan': update_plan})
274274

0 commit comments

Comments
 (0)