docs(models): sync WorkspaceProfile dataclass to 4-field model
Match the actual src/models.py WorkspaceProfile: - name: str - ini_content: str - show_windows: Dict[str, bool] - panel_states: Dict[str, Any] Remove fictional fields (scope, auto_switch_triggers, description). Remove non-existent LayoutPreset class (was a 2026-06-05 casualty).
This commit is contained in:
+6
-14
@@ -315,26 +315,18 @@ class HookResponse:
|
||||
data: dict[str, Any] = field(default_factory=dict)
|
||||
```
|
||||
|
||||
### `WorkspaceProfile`, `LayoutPreset` — Layouts
|
||||
### `WorkspaceProfile` — Layouts
|
||||
|
||||
```python
|
||||
@dataclass
|
||||
class WorkspaceProfile:
|
||||
name: str
|
||||
scope: Literal["global", "project"]
|
||||
docking_layout: str # ImGui ini-string
|
||||
window_visibility: dict[str, bool] = field(default_factory=dict)
|
||||
panel_state: dict[str, dict] = field(default_factory=dict)
|
||||
auto_switch_triggers: list[str] = field(default_factory=list)
|
||||
description: str = ""
|
||||
|
||||
@dataclass
|
||||
class LayoutPreset:
|
||||
name: str
|
||||
multi_viewport_state: dict[str, Any] = field(default_factory=dict)
|
||||
description: str = ""
|
||||
ini_content: str # ImGui ini settings string (from SaveIniSettingsToMemory)
|
||||
show_windows: Dict[str, bool] = field(default_factory=dict)
|
||||
panel_states: Dict[str, Any] = field(default_factory=dict)
|
||||
```
|
||||
|
||||
> **Note:** The 2026-06-05 refactor (per `live_gui_fragility_fixes_20260605`) collapsed the previous design (which had `docking_layout: bytes` with base64, plus `theme`, `theme_fx_enabled`, `captured_at`, `description` as additional fields) into a 4-field model. `ini_content` is a plain `str` (not base64) because `ImGui.SaveIniSettingsToMemory()` returns a string and `tomli_w` rejects `bytes`. `LayoutPreset` is no longer a separate class; multi-viewport state lives in `panel_states`. See [guide_workspace_profiles.md](guide_workspace_profiles.md) for the full data model and TOML example.
|
||||
|
||||
### `RAGConfig`, `RAGChunk`, `RAGResult` — RAG
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user