chore: misc UI improvements (#317)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2025-12-18 22:21:48 -08:00
committed by GitHub
parent 52b45fe960
commit c32e43cac8
6 changed files with 40 additions and 53 deletions

View File

@@ -34,10 +34,20 @@ const THINKING_VERBS = [
"initializing",
] as const;
// Get a random thinking message
export function getRandomThinkingMessage(agentName?: string | null): string {
// Get a random thinking verb (e.g., "thinking", "processing")
function getRandomVerb(): string {
const index = Math.floor(Math.random() * THINKING_VERBS.length);
const verb = THINKING_VERBS[index] ?? "thinking";
return THINKING_VERBS[index] ?? "thinking";
}
// Get a random thinking verb phrase (e.g., "is thinking", "is processing")
export function getRandomThinkingVerb(): string {
return `is ${getRandomVerb()}`;
}
// Get a random thinking message (full string with agent name)
export function getRandomThinkingMessage(agentName?: string | null): string {
const verb = getRandomVerb();
if (agentName) {
return `${agentName} is ${verb}`;