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()