Persons: other people's charts with package slots, list page, switcher
- charts.kind own/person; a new person uses a 'person' unit (not refunded on delete); person packages and an unlimited entitlement; admins unlimited - a person's birth data can be corrected within an hour (admins any time) - /kepletek list with tiles, /kepletek/uj, correction page, mock person packages, chart page title switches between charts keeping the tab Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -45,8 +45,12 @@ pub struct Config {
|
||||
pub summary_model: String,
|
||||
/// `ANALYSIS_PROMPT_VERSION` (default `v2`); part of the analysis cache key.
|
||||
pub prompt_version: String,
|
||||
/// `MAX_CHARTS_PER_USER` (default 50).
|
||||
/// `MAX_CHARTS_PER_USER` (default 1000): a safety cap, also for unlimited packages.
|
||||
pub max_charts_per_user: i64,
|
||||
/// `FREE_PERSON_SLOTS` (default 0): persons a user may add without a package.
|
||||
pub free_person_slots: i64,
|
||||
/// `PERSON_PACK_SIZE` (default 5): persons in one person package.
|
||||
pub person_pack_size: i64,
|
||||
}
|
||||
|
||||
fn var(name: &str) -> Option<String> {
|
||||
@@ -99,7 +103,9 @@ impl Config {
|
||||
analysis_model: var("ANALYSIS_MODEL").unwrap_or_else(|| "anthropic/claude-opus-5.5".into()),
|
||||
summary_model: var("SUMMARY_MODEL").unwrap_or_else(|| "anthropic/claude-sonnet-5.5".into()),
|
||||
prompt_version: var("ANALYSIS_PROMPT_VERSION").unwrap_or_else(|| "v2".into()),
|
||||
max_charts_per_user: parsed("MAX_CHARTS_PER_USER", 50)?,
|
||||
max_charts_per_user: parsed("MAX_CHARTS_PER_USER", 1000)?,
|
||||
free_person_slots: parsed("FREE_PERSON_SLOTS", 0)?,
|
||||
person_pack_size: parsed("PERSON_PACK_SIZE", 5)?,
|
||||
};
|
||||
if config.session_ttl_days < 1 {
|
||||
bail!("SESSION_TTL_DAYS must be at least 1");
|
||||
@@ -128,6 +134,8 @@ impl Config {
|
||||
summary_model: "anthropic/claude-summary".into(),
|
||||
prompt_version: "v1".into(),
|
||||
max_charts_per_user: 50,
|
||||
free_person_slots: 5,
|
||||
person_pack_size: 5,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user