Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions services/export_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from models import Bubble
from models.export import CollectedExportEntry
from services.summary_cache import fingerprint_workspace_storage, nocache_enabled
from services.summary_cache import nocache_enabled
from services.workspace_context import (
WorkspaceContext,
enrich_workspace_context_from_global_db,
Expand All @@ -22,7 +22,6 @@
from services.workspace_db import (
COMPOSER_ROWS_WITH_HEADERS_SQL,
collect_workspace_entries,
global_storage_db_path,
load_code_block_diff_map,
open_global_db,
safe_fetchall,
Expand Down Expand Up @@ -84,7 +83,6 @@ class WorkspaceOrchestration:

workspace_path: str
workspace_entries: list[dict[str, Any]]
fingerprint: dict[str, Any]
ctx: WorkspaceContext
workspace_id_to_display_name: dict[str, str]
workspace_id_to_slug: dict[str, str]
Expand Down Expand Up @@ -135,21 +133,12 @@ def prepare_workspace_orchestration(
nocache: bool = False,
workspace_entries: list[dict[str, Any]] | None = None,
) -> WorkspaceOrchestration:
"""Scan workspace storage and resolve maps (with summary-cache fingerprint)."""
"""Scan workspace storage and resolve maps for listing and export."""
entries = (
workspace_entries
if workspace_entries is not None
else collect_workspace_entries(workspace_path)
)
gdb = global_storage_db_path(workspace_path)
cli_path = get_cli_chats_path()
fingerprint = fingerprint_workspace_storage(
workspace_path,
entries,
global_db_path=gdb if os.path.isfile(gdb) else None,
rules=rules,
cli_chats_path=cli_path if os.path.isdir(cli_path) else None,
)
ctx = resolve_workspace_context_cached(
workspace_path,
rules,
Expand All @@ -160,7 +149,6 @@ def prepare_workspace_orchestration(
return WorkspaceOrchestration(
workspace_path=workspace_path,
workspace_entries=entries,
fingerprint=fingerprint,
ctx=ctx,
workspace_id_to_display_name=display_name,
workspace_id_to_slug=slug_map,
Expand Down
13 changes: 2 additions & 11 deletions services/search_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
)
from services.summary_cache import (
CACHE_DIR,
fingerprint_workspace_storage,
nocache_enabled,
workspace_storage_fingerprint,
)
from services.workspace_db import (
COMPOSER_ROWS_WITH_HEADERS_SQL,
Expand All @@ -40,7 +40,6 @@
)
from utils.path_helpers import to_epoch_ms
from utils.exclusion_rules import RuleTokens
from utils.workspace_path import get_cli_chats_path

__all__ = [
"SEARCH_INDEX_FILE",
Expand Down Expand Up @@ -130,15 +129,7 @@ def index_search_enabled() -> bool:

def _storage_fingerprint(workspace_path: str, rules: list[RuleTokens]) -> dict[str, Any]:
entries = collect_workspace_entries(workspace_path)
gdb = global_storage_db_path(workspace_path)
cli_path = get_cli_chats_path()
return fingerprint_workspace_storage(
workspace_path,
entries,
global_db_path=gdb if os.path.isfile(gdb) else None,
rules=rules,
cli_chats_path=cli_path if os.path.isdir(cli_path) else None,
)
return workspace_storage_fingerprint(workspace_path, entries, rules)


def _open_index_db(*, readonly: bool = True) -> sqlite3.Connection | None:
Expand Down
Loading
Loading