mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-09 21:27:53 -05:00
Setting up the front and back logs for the backend
This commit is contained in:
@@ -109,6 +109,18 @@ class Architect(BaseAgent):
|
||||
self.next_state.specification = spec
|
||||
telemetry.set("templates", spec.templates)
|
||||
self.next_state.action = ARCHITECTURE_STEP_NAME
|
||||
await self.ui.clear_main_logs()
|
||||
await self.ui.send_front_logs_headers("be_0", ["E2 / T3", "done"], "Setting up backend")
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
"id": "be_0",
|
||||
"title": "Setting up backend",
|
||||
"project_state_id": "be_0",
|
||||
"labels": ["E2 / T3", "Backend setup", "done"],
|
||||
}
|
||||
]
|
||||
)
|
||||
return AgentResponse.done(self)
|
||||
|
||||
async def select_templates(self, spec: Specification) -> tuple[str, dict[ProjectTemplateEnum, Any]]:
|
||||
|
||||
@@ -337,6 +337,20 @@ class Developer(ChatWithBreakdownMixin, RelevantFilesMixin, BaseAgent):
|
||||
"task_index": task_index,
|
||||
}
|
||||
)
|
||||
await self.ui.clear_main_logs()
|
||||
await self.ui.send_front_logs_headers(
|
||||
f"be_{task_index}_{task_index + 1}", [f"E{task_index} / T{task_index + 1}", "working"], description
|
||||
)
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
"id": f"be_{task_index}_{task_index + 1}",
|
||||
"title": description,
|
||||
"project_state_id": f"be_{task_index}_{task_index + 1}",
|
||||
"labels": [f"E{task_index} / T{task_index + 1}", "working"],
|
||||
}
|
||||
]
|
||||
)
|
||||
await self.send_message(f"Starting task #{task_index} with the description:\n\n## {description}")
|
||||
if self.current_state.run_command:
|
||||
await self.ui.send_run_command(self.current_state.run_command)
|
||||
|
||||
@@ -44,7 +44,6 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
|
||||
if finished is None:
|
||||
await self.ui.clear_main_logs()
|
||||
await self.ui.send_front_logs_headers("fe_0", ["E2 / T1", "done"], "Building frontend")
|
||||
await self.ui.send_front_logs_headers("be_0", ["E2 / T2", "working"], "Setting up backend")
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
@@ -55,6 +54,8 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
await self.ui.send_front_logs_headers("be_0", ["E2 / T2", "working"], "Setting up backend")
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user