From db170a10b847fa3397394893f3663831cf58c6d0 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Wed, 8 Apr 2026 23:30:46 -0700 Subject: [PATCH] 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) --- src/model/types.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/model/types.rs b/src/model/types.rs index 0450268..c368a63 100644 --- a/src/model/types.rs +++ b/src/model/types.rs @@ -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 {