Skip to content
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

🐛 Added back the reset of the repository before we send the response back #671

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions kai/rpc_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ def get_codeplan_agent_solution(

chatter.get().chat_simple("Getting solution!")

overall_result = GetCodeplanAgentSolutionResult(
encountered_errors=[],
modified_files=[],
diff="",
)

# ExitStack calls its callbacks in reverse order upon exiting the with
# block, **even if an exception is raised**.
with ExitStack() as defer:
Expand Down Expand Up @@ -572,12 +578,6 @@ def get_codeplan_agent_solution(
params.max_iterations, app.task_manager.get_next_task
)

overall_result = GetCodeplanAgentSolutionResult(
encountered_errors=[],
modified_files=[],
diff="",
)

initial_solved_tasks = app.task_manager.processed_tasks
initial_ignored_tasks = set(app.task_manager.ignored_tasks)

Expand Down Expand Up @@ -636,10 +636,10 @@ def get_codeplan_agent_solution(

chatter.get().chat_simple("Finished!")

server.send_response(
id=id,
result=overall_result.model_dump(), # Must dump as a dict for some reason?
)
server.send_response(
id=id,
result=overall_result.model_dump(), # Must dump as a dict for some reason?
)


P = ParamSpec("P")
Expand Down
Loading