@bojackduy/opencode-telescope 0.1.28 → 0.1.29

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@bojackduy/opencode-telescope",
4
- "version": "0.1.28",
4
+ "version": "0.1.29",
5
5
  "description": "OpenCode TUI plugin for fuzzy and semantic search across local conversation history, session transcripts, and AI coding chats",
6
6
  "type": "module",
7
7
  "license": "MIT",
package/search/queries.ts CHANGED
@@ -59,10 +59,9 @@ export function recentSessionMessages(options?: { limit?: number; offset?: numbe
59
59
  const limit = options?.limit ?? 40
60
60
  const indexed = dbPath === ":memory:" ? undefined : indexedRecentRows(db, dbPath, limit, options?.directory, options?.offset, options?.role)
61
61
  if (indexed) return indexed.flatMap((row) => rowToSearchResult(row, "") ?? [])
62
- debug.log("query:recent:source-fallback", { limit, offset: options?.offset ?? 0, directory: options?.directory, role: options?.role })
63
- return visibleTextRows(db, limit, undefined, options?.directory, options?.offset, options?.role).flatMap(
64
- (row) => rowToSearchResult(row, "") ?? [],
65
- )
62
+ if (dbPath !== ":memory:") scheduleBackgroundIndexRebuild(dbPath)
63
+ debug.log("query:recent:index-pending", { limit, offset: options?.offset ?? 0, directory: options?.directory, role: options?.role })
64
+ return []
66
65
  }
67
66
 
68
67
  export function loadConversationAround(result: SearchResult, options?: { before?: number; after?: number; dbPath?: string }): ConversationPreviewPage {
@@ -404,6 +403,7 @@ function indexedRecentRows(db: Database, dbPath: string, limit: number, director
404
403
  expectedDataVersion: state.dataVersion,
405
404
  actualDataVersion: currentDataVersion,
406
405
  })
406
+ scheduleBackgroundIndexRebuild(dbPath)
407
407
  }
408
408
 
409
409
  const conditions: string[] = ["part_type = 'text'"]
package/telescope.tsx CHANGED
@@ -342,7 +342,7 @@ export const Telescope = (props: { api: TuiPluginApi; config: TelescopeConfig; o
342
342
  debug.log("worker:timeout", { id: request.id, ms: SEARCH_WORKER_TIMEOUT_MS })
343
343
  searchWorker?.terminate()
344
344
  searchWorker = undefined
345
- runSearchFallback(request, "worker-timeout")
345
+ failSearch(request, "Search worker timed out. The conversation index may still be building; try again shortly.")
346
346
  }, SEARCH_WORKER_TIMEOUT_MS)
347
347
  ;(searchWatchdogTimer as { unref?: () => void }).unref?.()
348
348
  searchWorker!.postMessage(msg)