Skip to content

Commit

Permalink
🐛 dedup messages in overall result (#698)
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad authored Feb 28, 2025
1 parent 759df7a commit ce53a1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kai/rpc_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ def get_codeplan_agent_solution(
initial_solved_tasks = app.task_manager.processed_tasks
initial_ignored_tasks = set(app.task_manager.ignored_tasks)

overall_modified_files: set[str] = set()
for task in next_task_fn(params.max_priority, params.max_depth):
app.log.debug(f"Executing task {task.__class__.__name__}: {task}")

Expand All @@ -599,12 +600,14 @@ def get_codeplan_agent_solution(
overall_result.encountered_errors.extend(
[str(e) for e in result.encountered_errors]
)
overall_result.modified_files.extend(
[str(f) for f in result.modified_files]
overall_modified_files = overall_modified_files.union(
set([str(f) for f in result.modified_files])
)

app.log.debug(result)

overall_result.modified_files = list(overall_modified_files)

# after we have completed all the tasks, we should show what has been
# accomplished for this particular solution
app.log.debug("QUEUE_STATE_END_OF_CODE_PLAN: SUCCESSFUL TASKS: START")
Expand Down

0 comments on commit ce53a1d

Please sign in to comment.