@@ -75,6 +75,8 @@ def list_workspaces() -> tuple[Response, int] | Response:
7575 except Exception :
7676 _logger .exception ("Failed to get workspaces" )
7777 return json_response ({"error" : "Failed to get workspaces" }, 500 )
78+
79+
7880# ---------------------------------------------------------------------------
7981# GET /api/workspaces/<id>
8082# ---------------------------------------------------------------------------
@@ -158,6 +160,8 @@ def get_workspace(workspace_id: str) -> tuple[Response, int] | Response:
158160 except Exception :
159161 _logger .exception ("Failed to get workspace" )
160162 return json_response ({"error" : "Failed to get workspace" }, 500 )
163+
164+
161165# ---------------------------------------------------------------------------
162166# GET /api/workspaces/<id>/tabs
163167# ---------------------------------------------------------------------------
@@ -198,6 +202,8 @@ def get_workspace_tabs(workspace_id: str) -> tuple[Response, int] | Response:
198202 except Exception :
199203 _logger .exception ("Failed to get workspace tabs" )
200204 return json_response ({"error" : "Failed to get workspace tabs" }, 500 )
205+
206+
201207# ---------------------------------------------------------------------------
202208# GET /api/workspaces/<id>/tabs/<composer_id>
203209# ---------------------------------------------------------------------------
@@ -207,12 +213,15 @@ def get_workspace_tab(workspace_id: str, composer_id: str) -> tuple[Response, in
207213 """Lazy-load one conversation tab (GET /api/workspaces/<id>/tabs/<composer_id>).
208214
209215 Args:
210- workspace_id: IDE workspace folder name (CLI workspaces return 400).
216+ workspace_id: Storage folder name, ``global`` for unassigned chats, or
217+ ``cli:<project_id>`` (CLI workspaces return 400).
211218 composer_id: Composer UUID to load.
212219
213220 Returns:
214- Single-tab JSON from :func:`services.workspace_tabs.assemble_single_tab`.
215- 400 for CLI workspaces; 500 on unexpected failure.
221+ Single-tab JSON from :func:`services.workspace_tabs.assemble_single_tab`
222+ (typically ``{"tab": {...}}`` with optional ``warnings``). 400 for CLI
223+ workspaces; 404 when global storage is missing, the composer is not found,
224+ or it is not assigned to *workspace_id*; 500 on unexpected failure.
216225 """
217226 if workspace_id .startswith ("cli:" ):
218227 return json_response ({"error" : "Per-tab lazy load is not supported for CLI workspaces" }, 400 )
0 commit comments