4594f07ebc
Rework calibration.py into a fixed 10-question battery:
- 4 critical questions (language, name, persona name, gender)
- 6 random probes drawn from the 12-item pool (all AI/tech-unrelated)
Theme inference (palette × typography × density × labels):
- Palette: warmth × contrast × energy → default|rose|morning|evening|
sage|paper|ink; all choices verified WCAG AA ≥4.5:1.
- Typography: elaborate+warm → serif-warm; cool+ink → mono;
high-contrast+cool → serif-formal; energetic+warm → mixed-modern;
otherwise sans.
- Density: elaborate cadence → airy; terse → dense; else normal.
- Labels: serif-warm/mixed-modern → cursive; mono → prefix; else block.
Voice selection:
- Removed VOICE_POOL (lang × gender heuristic).
- Added _load_persona_voices(): reads [voices.<lang>].id from a
cart.toml persona file at PCART_CONFIG_PATH or app/conf/persona.toml.
Falls back to FALLBACK_VOICES when no file is present.
- _pick_voice(lang) selects by language key only — no gender heuristic.
cart_store.Cart changes:
- Added calibration_version: int = 1 (new carts emit 2)
- Bumped version: 3 → 4
- Removed unused import
No changes to app/main.py — calibration wiring was already correct.
28 lines
601 B
TOML
28 lines
601 B
TOML
[project]
|
|
name = "chat-saiden"
|
|
version = "0.1.0"
|
|
description = "TUI-styled web chat with BT-7274 — chat.saiden.dev"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"uvicorn[standard]>=0.32",
|
|
"websockets>=13",
|
|
"anthropic>=0.40",
|
|
"authlib>=1.3",
|
|
"itsdangerous>=2.2", # session cookie signing
|
|
"httpx>=0.27", # for authlib OAuth
|
|
"jinja2>=3.1", # template rendering
|
|
"python-multipart>=0.0.12", # form parsing
|
|
]
|
|
|
|
[tool.uv]
|
|
package = false
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"ruff>=0.15.15",
|
|
]
|