diff --git a/backend/main.py b/backend/main.py index 8b7206a..0b4e943 100644 --- a/backend/main.py +++ b/backend/main.py @@ -8350,17 +8350,16 @@ async def get_callers(): "key": k, "name": v["name"], "returning": v.get("returning", False), + "avatar_url": f"/api/avatar/{v['name']}", } bg = session.caller_backgrounds.get(k) - if isinstance(bg, CallerBackground): - caller_info["energy_level"] = bg.energy_level - caller_info["emotional_state"] = bg.emotional_state - caller_info["communication_style"] = _normalize_style_key(bg.communication_style) - caller_info["signature_detail"] = bg.signature_detail - caller_info["situation_summary"] = bg.situation_summary - caller_info["pool_name"] = bg.pool_name - caller_info["call_shape"] = session.caller_shapes.get(k, "standard") - caller_info["avatar_url"] = f"/api/avatar/{v['name']}" + if isinstance(bg, dict): + details = bg.get("specific_details") or [] + caller_info["identity"] = bg.get("identity", "") + caller_info["situation"] = bg.get("situation", "") + caller_info["signature"] = details[0] if details else "" + caller_info["secret_want"] = bg.get("secret_want", "") + caller_info["voice"] = bg.get("voice", "") callers.append(caller_info) return { "callers": callers, @@ -8454,17 +8453,16 @@ async def start_call(caller_key: str): if caller_key in session.caller_backgrounds: asyncio.create_task(_enrich_background_async(caller_key)) - # Extract CallerBackground structured data if available + # Extract slim background for UI info panel bg = session.caller_backgrounds.get(caller_key) caller_info = {} - if isinstance(bg, CallerBackground): + if isinstance(bg, dict): + details = bg.get("specific_details") or [] caller_info = { - "emotional_state": bg.emotional_state, - "energy_level": bg.energy_level, - "signature_detail": bg.signature_detail, - "situation_summary": bg.situation_summary, - "call_shape": caller.get("shape", "standard"), - "communication_style": bg.communication_style, + "identity": bg.get("identity", ""), + "situation": bg.get("situation", ""), + "signature": details[0] if details else "", + "secret_want": bg.get("secret_want", ""), } # Start intern monitoring if enabled diff --git a/frontend/css/style.css b/frontend/css/style.css index efe8b61..d6b1134 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -322,25 +322,6 @@ section h2 { position: relative; } -.energy-dot { - width: 8px; - height: 8px; - border-radius: 50%; - display: inline-block; - flex-shrink: 0; -} - -.shape-badge { - font-size: 0.6rem; - background: rgba(232, 121, 29, 0.25); - color: var(--accent); - padding: 1px 4px; - border-radius: 3px; - font-weight: bold; - letter-spacing: 0.5px; - flex-shrink: 0; -} - .caller-btn:hover { border-color: var(--accent); background: #2a1e10; @@ -439,20 +420,19 @@ section h2 { font-weight: 600; } -.info-badge.shape { - background: rgba(232, 121, 29, 0.2); - color: var(--accent); +.caller-identity { + font-size: 0.85rem; + color: var(--text); + font-weight: 600; + margin-bottom: 4px; + line-height: 1.3; } -.info-badge.energy { - color: white; - font-size: 0.7rem; -} - -.info-badge.emotion { - background: rgba(154, 139, 120, 0.2); +.caller-situation { + font-size: 0.8rem; color: var(--text-muted); - font-style: italic; + margin-bottom: 4px; + line-height: 1.3; } .caller-signature { @@ -462,9 +442,10 @@ section h2 { font-style: italic; } -.caller-situation { - font-size: 0.8rem; - color: var(--text-muted); +.caller-secret-want { + font-size: 0.75rem; + color: #d4a030; + font-style: italic; line-height: 1.3; } diff --git a/frontend/index.html b/frontend/index.html index 071f549..96dc68c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -73,14 +73,13 @@