Explorar el Código

fixed top left text block

Lukas Goldschmidt hace 1 mes
padre
commit
e9621ea25c
Se han modificado 2 ficheros con 9 adiciones y 0 borrados
  1. 5 0
      src/astro_mcp/chart_renderer.py
  2. 4 0
      src/astro_mcp/tools.py

+ 5 - 0
src/astro_mcp/chart_renderer.py

@@ -491,6 +491,11 @@ def _render_title_corner(
                 tz_name = dt.strftime("%Z")
                 if tz_name and tz_name != "UTC":
                     dt_str += f" {tz_name}"
+            else:
+                # Naive datetime (local time from DB) — use the timezone field
+                tz_name = inp.get("timezone", "")
+                if tz_name:
+                    dt_str += f" {tz_name}"
             lines.append((dt_str, "8px", theme["data_text"], False))
         except Exception:
             pass

+ 4 - 0
src/astro_mcp/tools.py

@@ -1606,6 +1606,8 @@ async def _get_person_birth_data(person_id: str) -> dict[str, Any]:
         "timezone": person.get("timezone"),
         "birth_datetime_utc": utc_dt,                  # for ephemeris calls
         "birthplace": person.get("birthplace"),
+        "name": person.get("name"),
+        "nickname": person.get("nickname"),
         "latitude": person["latitude"],
         "longitude": person["longitude"],
         "elevation": person.get("elevation", 0.0),
@@ -1658,6 +1660,8 @@ async def calculate_natal_chart_by_id(
     if "error" not in result:
         result["input"]["birth_datetime"] = birth["birth_datetime"]
         result["input"]["timezone"] = birth.get("timezone")
+        result["input"]["name"] = birth.get("name")
+        result["input"]["birthplace"] = birth.get("birthplace")
     return result