From a6ff43af1dae4d39e057ff04431f5bdc190f3553 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Thu, 22 May 2025 17:01:46 -0700 Subject: [PATCH] Fixups --- .../src/NewApp/Pages/GenerateCandidate.tsx | 26 ++++++++++--------- src/utils/agents/persona_generator.py | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/frontend/src/NewApp/Pages/GenerateCandidate.tsx b/frontend/src/NewApp/Pages/GenerateCandidate.tsx index 347c4b4..7b00907 100644 --- a/frontend/src/NewApp/Pages/GenerateCandidate.tsx +++ b/frontend/src/NewApp/Pages/GenerateCandidate.tsx @@ -123,7 +123,7 @@ const GenerateCandidate = (props: BackstoryElementProps) => { } else { setTimestamp(Date.now()) } - if (data.message) { + if (data.message !== '') { setStatus(data.message); } break; @@ -296,7 +296,7 @@ const GenerateCandidate = (props: BackstoryElementProps) => { } else { setTimestamp(Date.now()) } - if (data.message) { + if (data.message !== '') { setStatus(data.message); } break; @@ -366,24 +366,26 @@ const GenerateCandidate = (props: BackstoryElementProps) => { } - + - {processing && } - + sx={{ + width: 80, + height: 80, + border: '2px solid #e0e0e0', + }} + /> + {processing && } + + diff --git a/src/utils/agents/persona_generator.py b/src/utils/agents/persona_generator.py index f0b74c9..ab97583 100644 --- a/src/utils/agents/persona_generator.py +++ b/src/utils/agents/persona_generator.py @@ -218,6 +218,7 @@ class PersonaGenerator(Agent): self.username = persona.get("username", None) if not self.username: raise ValueError("LLM did not generate a username") + self.username = re.sub(r'\s+', '.', g) user_dir = os.path.join(defines.user_dir, persona["username"]) while os.path.exists(user_dir): match = re.match(r"^(.*?)(\d*)$", persona["username"])