@voidwire/lore 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/realtime.ts +3 -3
- package/lib/types.ts +3 -0
- package/package.json +1 -1
package/lib/realtime.ts
CHANGED
|
@@ -120,7 +120,7 @@ export async function indexAndEmbed(
|
|
|
120
120
|
* Insert event into FTS5 search table
|
|
121
121
|
* @returns rowid of inserted entry (used as doc_id for embeddings)
|
|
122
122
|
*/
|
|
123
|
-
function insertSearchEntry(db: Database, event: CaptureEvent): number {
|
|
123
|
+
export function insertSearchEntry(db: Database, event: CaptureEvent): number {
|
|
124
124
|
const source = getSourceForEvent(event);
|
|
125
125
|
const title = buildTitle(event);
|
|
126
126
|
const data = event.data as Record<string, unknown>;
|
|
@@ -185,7 +185,7 @@ function buildTitle(event: CaptureEvent): string {
|
|
|
185
185
|
* Extract content for embedding from event
|
|
186
186
|
* Concatenates type+topic+content for richer embeddings (matches lore-embed-all)
|
|
187
187
|
*/
|
|
188
|
-
function getContentForEmbedding(event: CaptureEvent): string {
|
|
188
|
+
export function getContentForEmbedding(event: CaptureEvent): string {
|
|
189
189
|
const data = event.data as Record<string, unknown>;
|
|
190
190
|
const content = String(data.content || data.text || "");
|
|
191
191
|
const topic = String(data.topic || "").trim();
|
|
@@ -298,7 +298,7 @@ function insertEmbedding(
|
|
|
298
298
|
/**
|
|
299
299
|
* Extract type value for embeddings partition column
|
|
300
300
|
*/
|
|
301
|
-
function extractType(event: CaptureEvent): string {
|
|
301
|
+
export function extractType(event: CaptureEvent): string {
|
|
302
302
|
const data = event.data as Record<string, unknown>;
|
|
303
303
|
|
|
304
304
|
switch (event.type) {
|
package/lib/types.ts
CHANGED