| 1 | namespace AgentForge.Plugin.Grouping.Core; |
| 2 | |
| 3 | public static class ForgeGroupingStackOptions |
| 4 | { |
| 5 | public const int MaxStackDepth = 4; |
| 6 | |
| 7 | public static int ParseEditorRowCount(string? groupStackRowsQuery, int stackCount) |
| 8 | { |
| 9 | if (int.TryParse(groupStackRowsQuery, out var rows)) |
| 10 | return Math.Clamp(rows, 1, MaxStackDepth); |
| 11 | |
| 12 | return Math.Max(1, stackCount); |
| 13 | } |
| 14 | |
| 15 | public static int DefaultEditorRowCount(int stackCount) => Math.Max(1, stackCount); |
| 16 | |
| 17 | public static bool ShouldEmitEditorRowCountQuery(int editorRowCount, int stackCount) => |
| 18 | editorRowCount != DefaultEditorRowCount(stackCount); |
| 19 | } |
| 20 | |
View only · write via MCP/CIDE