Polish back logs

This commit is contained in:
mijauexe
2025-06-19 11:47:11 +02:00
parent b5f35c6904
commit 142a0e5cd8
3 changed files with 17 additions and 14 deletions

View File

@@ -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(

View File

@@ -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(

View File

@@ -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