File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 run : uv sync
3838
3939 - name : Run tests
40- run : uv run pytest -v --tb=short
40+ run : uv run pytest -v --tb=short 2>&1 | tee test-output.txt; exit ${PIPESTATUS[0]}
41+
42+ - name : Upload test output on failure
43+ if : failure()
44+ uses : actions/upload-artifact@v4
45+ with :
46+ name : test-output
47+ path : test-output.txt
4148
4249 version :
4350 name : Bump version and create tag
Original file line number Diff line number Diff line change 1313
1414from convx_ai .adapters import default_input_path , get_adapter
1515from convx_ai .engine import SyncResult , sync_sessions
16- from convx_ai .search import ensure_index
17- from convx_ai .tui import ExploreApp
1816from convx_ai .utils import sanitize_segment
1917
2018app = typer .Typer (help = "Export AI conversations into a Git repo." , no_args_is_help = True )
@@ -233,6 +231,9 @@ def explore_command(
233231 ),
234232) -> None :
235233 """Browse and search exported conversations in a TUI."""
234+ from convx_ai .search import ensure_index
235+ from convx_ai .tui import ExploreApp
236+
236237 repo = _require_git_repo (output_path )
237238 index_path = repo / ".convx" / "index.json"
238239 if not index_path .exists ():
Original file line number Diff line number Diff line change 44import shutil
55from pathlib import Path
66
7- from tantivy import Document , Index , SchemaBuilder
8-
97
108def _schema ():
9+ from tantivy import SchemaBuilder
10+
1111 return (
1212 SchemaBuilder ()
1313 .add_text_field ("session_key" , stored = True )
@@ -34,6 +34,8 @@ def ensure_index(repo: Path) -> None:
3434 if search_dir .exists ():
3535 shutil .rmtree (search_dir )
3636 search_dir .mkdir (parents = True )
37+ from tantivy import Document , Index
38+
3739 schema = _schema ()
3840 index = Index (schema = schema , path = str (search_dir ))
3941 writer = index .writer (heap_size = 15_000_000 , num_threads = 1 )
@@ -84,6 +86,8 @@ def list_sessions(repo: Path) -> list[dict]:
8486
8587
8688def query_index (repo : Path , q : str , limit : int = 50 ) -> list [dict ]:
89+ from tantivy import Index
90+
8791 search_dir = repo / ".convx" / "search-index"
8892 if not search_dir .exists ():
8993 return []
You can’t perform that action at this time.
0 commit comments