mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 13:37:55 -05:00
Polish back logs
This commit is contained in:
@@ -62,6 +62,17 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
|
||||
"""
|
||||
Starts the frontend of the app.
|
||||
"""
|
||||
await self.ui.clear_main_logs()
|
||||
await self.ui.send_front_logs_headers(str(self.next_state.id), ["E2 / T1", "working"], "Building frontend")
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
"title": "Building frontend",
|
||||
"project_state_id": str(self.next_state.id),
|
||||
"labels": ["E2 / T1", "Frontend", "working"],
|
||||
}
|
||||
]
|
||||
)
|
||||
self.next_state.action = FE_START
|
||||
await self.send_message("## Building the frontend\n\nThis may take a couple of minutes.")
|
||||
|
||||
@@ -174,7 +185,7 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
|
||||
|
||||
if answer.button == "yes":
|
||||
fe_states = await self.state_manager.get_fe_states()
|
||||
first_fe_state_id = fe_states[0].prev_state_id if fe_states else None
|
||||
first_fe_state_id = fe_states[0].id if fe_states else None
|
||||
|
||||
await self.ui.clear_main_logs()
|
||||
await self.ui.send_front_logs_headers(
|
||||
|
||||
@@ -209,7 +209,6 @@ class SpecWriter(BaseAgent):
|
||||
convo = convo.assistant(llm_assisted_description)
|
||||
|
||||
await self.ui.clear_main_logs()
|
||||
await self.ui.send_front_logs_headers(str(self.next_state.id), ["E2 / T1", "working"], "Building frontend")
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
@@ -220,15 +219,6 @@ class SpecWriter(BaseAgent):
|
||||
}
|
||||
]
|
||||
)
|
||||
await self.ui.send_back_logs(
|
||||
[
|
||||
{
|
||||
"title": "Building frontend",
|
||||
"project_state_id": str(self.next_state.id),
|
||||
"labels": ["E2 / T1", "Frontend", "working"],
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
llm = self.get_llm(SPEC_WRITER_AGENT_NAME)
|
||||
convo = AgentConvo(self).template(
|
||||
|
||||
@@ -235,9 +235,11 @@ async def run_pythagora_session(sm: StateManager, ui: UIBase, args: Namespace):
|
||||
}
|
||||
]
|
||||
)
|
||||
await ui.send_message(
|
||||
sm.current_state.specification.description, extra_info={"route": "forwardToCenter", "screen": "spec"}
|
||||
)
|
||||
if not fe_states and be_back_logs and not last_task_in_db:
|
||||
await ui.send_message(
|
||||
sm.current_state.specification.description,
|
||||
extra_info={"route": "forwardToCenter", "screen": "spec"},
|
||||
)
|
||||
|
||||
# FRONTEND
|
||||
|
||||
|
||||
Reference in New Issue
Block a user