Skip to content

Commit 2c4ed92

Browse files
authored
Refactor: eliminate export script service-layer duplication (~700 LOC) closes #42 (#61)
* initial implementation of export refinements * refactor: eliminate remaining duplications from export pipeline Extract _load_bubble_map/_load_project_layouts_map/_load_code_block_diff_map to services/workspace_db.py; add cursor_ide_chat_to_markdown to utils/cursor_md_exporter.py; remove private _slug() copies from api/export_api.py and utils/cursor_md_exporter.py. * fix: inconsistent YAML escaping for workspace_name * fix: review comments * fix: state_path omits an encoding
1 parent 6074381 commit 2c4ed92

10 files changed

Lines changed: 691 additions & 997 deletions

api/export_api.py

Lines changed: 94 additions & 325 deletions
Large diffs are not rendered by default.

api/workspaces.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from utils.workspace_path import resolve_workspace_path, get_cli_chats_path
1717
from utils.cli_chat_reader import list_cli_projects
1818
from utils.path_helpers import get_workspace_folder_paths, get_workspace_display_name
19-
from utils.workspace_descriptor import _read_json_file
19+
from utils.workspace_descriptor import read_json_file
2020
from services.workspace_resolver import (
2121
_infer_workspace_name_from_context,
2222
# Re-exported for back-compat with existing tests that import from api.workspaces
@@ -107,7 +107,7 @@ def get_workspace(workspace_id):
107107
folder = None
108108
workspace_name = workspace_id
109109
try:
110-
wd = _read_json_file(wj_path)
110+
wd = read_json_file(wj_path)
111111
folder_paths = get_workspace_folder_paths(wd)
112112
folder = folder_paths[0] if folder_paths else wd.get("folder")
113113
derived_name = get_workspace_display_name(wd)

0 commit comments

Comments
 (0)