Sprint 0-2: TS plugin scaffolding, LanceDB utils, tooling updates
- Add index-tool.ts command implementation - Wire lancedb.ts vector search into plugin - Update src/tools/index.ts exports - Bump package deps (ts-jest, jest, typescript, lancedb) - Add .claude/settings.local.json Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -79,6 +79,9 @@ def create_table_if_not_exists(db: Any) -> Any:
|
||||
)
|
||||
|
||||
tbl = db.create_table(TABLE_NAME, schema=schema, exist_ok=True)
|
||||
# Create FTS index on chunk_text for DEGRADED mode fallback (Ollama down)
|
||||
# replace=True makes this idempotent — safe to call on existing tables
|
||||
tbl.create_fts_index("chunk_text", replace=True)
|
||||
return tbl
|
||||
|
||||
|
||||
@@ -153,11 +156,11 @@ def search_chunks(
|
||||
chunk_text=r["chunk_text"],
|
||||
source_file=r["source_file"],
|
||||
source_directory=r["source_directory"],
|
||||
section=r.get("section"),
|
||||
date=r.get("date"),
|
||||
tags=r.get("tags", []),
|
||||
chunk_index=r.get("chunk_index", 0),
|
||||
score=r.get("_score", 0.0),
|
||||
section=r.get("section") if r.get("section") not in (None, "None") else None,
|
||||
date=r.get("date") if r.get("date") not in (None, "None") else None,
|
||||
tags=r.get("tags") or [],
|
||||
chunk_index=r.get("chunk_index") or 0,
|
||||
score=r.get("_distance") or 0.0,
|
||||
)
|
||||
for r in results
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user