fix: make FTS5 optional for template search (fixes Claude Desktop compatibility)
- Added runtime FTS5 detection in database adapters - Removed FTS5 from required schema to prevent "no such module" errors - FTS5 tables/triggers created conditionally only if supported - Template search automatically falls back to LIKE when FTS5 unavailable - Works in ALL SQLite environments (Claude Desktop, restricted envs, etc.) This ensures search_templates() works correctly regardless of SQLite build, while still providing optimal performance when FTS5 is available. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,5 @@ CREATE INDEX IF NOT EXISTS idx_template_nodes ON templates(nodes_used);
|
||||
CREATE INDEX IF NOT EXISTS idx_template_updated ON templates(updated_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_template_name ON templates(name);
|
||||
|
||||
-- Full-text search for templates
|
||||
CREATE VIRTUAL TABLE IF NOT EXISTS templates_fts USING fts5(
|
||||
name, description, content=templates
|
||||
);
|
||||
-- Note: FTS5 tables are created conditionally at runtime if FTS5 is supported
|
||||
-- See template-repository.ts initializeFTS5() method
|
||||
Reference in New Issue
Block a user