From 98400358af92070de09decd3b8773bf4e9d76cdb Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 5 May 2026 20:50:47 -0400 Subject: [PATCH] feat(models): implement WorkspaceProfile dataclass --- src/models.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/models.py b/src/models.py index 7371bd5..02684e0 100644 --- a/src/models.py +++ b/src/models.py @@ -669,6 +669,29 @@ class RAGConfig: chunk_overlap=data.get("chunk_overlap", 200), ) +@dataclass +class WorkspaceProfile: + name: str + ini_content: str + show_windows: Dict[str, bool] + panel_states: Dict[str, Any] + + def to_dict(self) -> Dict[str, Any]: + return { + "ini_content": self.ini_content, + "show_windows": self.show_windows, + "panel_states": self.panel_states, + } + + @classmethod + def from_dict(cls, name: str, data: Dict[str, Any]) -> "WorkspaceProfile": + return cls( + name=name, + ini_content=data.get("ini_content", ""), + show_windows=data.get("show_windows", {}), + panel_states=data.get("panel_states", {}), + ) + def load_mcp_config(path: str) -> MCPConfiguration: if not os.path.exists(path): return MCPConfiguration()