hasTopicEmbeddings method
- String topicId
Check whether a topic's chunks have embeddings locally.
Implementation
bool hasTopicEmbeddings(String topicId) {
if (_db == null) return false;
final result = _db!.select(
'SELECT COUNT(*) as cnt FROM local_chunks WHERE topic_id = ? AND embedding IS NOT NULL',
[topicId],
);
return (result.first['cnt'] as int) > 0;
}