feat(model): add regular_category_names to Model

Updates `Model` to include `regular_category_names` , which returns
category names excluding virtual categories (_Index, _Dim). This allows
other parts of the application to distinguish between user-defined
categories and system-internal ones.

Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
This commit is contained in:
Edward Langley
2026-04-08 23:30:46 -07:00
parent d14ec443c2
commit db170a10b8

View File

@ -250,6 +250,15 @@ impl Model {
self.categories.keys().map(|s| s.as_str()).collect()
}
/// Category names excluding virtual categories (_Index, _Dim).
pub fn regular_category_names(&self) -> Vec<&str> {
self.categories
.iter()
.filter(|(_, c)| c.kind.is_regular())
.map(|(name, _)| name.as_str())
.collect()
}
/// Evaluate a computed value at a given key, considering formulas.
/// Returns None when the cell is empty (no stored value, no applicable formula).
pub fn evaluate(&self, key: &CellKey) -> Option<CellValue> {