codeden 0.6.3 → 0.7.0
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/README.md +12 -5
- package/dist/cli.js +1 -1
- package/dist/drizzle/20261113075317_transcript_search/migration.sql +29 -0
- package/dist/drizzle/20261113075317_transcript_search/snapshot.json +3635 -0
- package/dist/drizzle/20261113083655_runners/migration.sql +17 -0
- package/dist/drizzle/20261113083655_runners/snapshot.json +3792 -0
- package/dist/drizzle/20261113165404_search_newest_first/migration.sql +43 -0
- package/dist/drizzle/20261113165404_search_newest_first/snapshot.json +3785 -0
- package/dist/{main-Bx58CdV4.js → main-BITVD_Bx.js} +4781 -1305
- package/dist/main-BITVD_Bx.js.map +1 -0
- package/dist/{main-CMt4z1Z9.js → main-NN0iK2tB.js} +2 -2
- package/dist/{main-CMt4z1Z9.js.map → main-NN0iK2tB.js.map} +1 -1
- package/dist/{mediaType-BCz-hbZl.js → mediaType-N0hKQqG9.js} +2 -2
- package/dist/{mediaType-BCz-hbZl.js.map → mediaType-N0hKQqG9.js.map} +1 -1
- package/dist/{runner-CiaiUWOE.js → runner-CQYh087M.js} +1302 -304
- package/dist/runner-CQYh087M.js.map +1 -0
- package/dist/runner.js +1 -1
- package/dist/{server-test-b0hHPqXb.js → server-test-BwyCFssm.js} +3 -3
- package/dist/{server-test-b0hHPqXb.js.map → server-test-BwyCFssm.js.map} +1 -1
- package/dist/{tree-31WAOm5k.js → tree-Bjv-rXir.js} +457 -21
- package/dist/tree-Bjv-rXir.js.map +1 -0
- package/dist/web/assets/{core-FqX7NQzW.js → core-EsMgAasL.js} +1 -1
- package/dist/web/assets/engine-oniguruma-C2eJcn5h.js +1 -0
- package/dist/web/assets/{highlighted-body-JLMTFACH-BMKFJRL-.js → highlighted-body-JLMTFACH-Co1oXN1b.js} +1 -1
- package/dist/web/assets/{highlights-9yuGk1pg.js → highlights-DUjJZrPQ.js} +1 -1
- package/dist/web/assets/index-29XyPQXD.css +1 -0
- package/dist/web/assets/index-DK4GsIYY.js +943 -0
- package/dist/web/assets/langs-BduZAjBk.js +1 -0
- package/dist/web/assets/mermaid-WFAXDIZX-D00b7K53.js +1 -0
- package/dist/web/assets/{shiki-Qa-y3xHo.js → shiki-DP8JfDZC.js} +2 -2
- package/dist/web/assets/{stream-tokenizer-VL43-ily.js → stream-tokenizer-IR1cpBIQ.js} +1 -1
- package/dist/web/assets/{themes-Di4DO5zr.js → themes-D2aixyve.js} +2 -2
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/main-Bx58CdV4.js.map +0 -1
- package/dist/runner-CiaiUWOE.js.map +0 -1
- package/dist/tree-31WAOm5k.js.map +0 -1
- package/dist/web/assets/engine-oniguruma-C5UP18m1.js +0 -1
- package/dist/web/assets/index-C3QkKvUn.js +0 -942
- package/dist/web/assets/index-CmllrYFx.css +0 -1
- package/dist/web/assets/langs-DfCgj44a.js +0 -1
- package/dist/web/assets/mermaid-WFAXDIZX-zTA5f8lD.js +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
-- Transcript search, newest first (§6): rebuilt rather than converted. `item_search` is a projection of `items`, so it is emptied here and the background backfill indexes every item again.
|
|
2
|
+
DROP TRIGGER IF EXISTS `item_search_ai`;
|
|
3
|
+
--> statement-breakpoint
|
|
4
|
+
DROP TRIGGER IF EXISTS `item_search_ad`;
|
|
5
|
+
--> statement-breakpoint
|
|
6
|
+
DROP TRIGGER IF EXISTS `item_search_au`;
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
DROP TABLE IF EXISTS `item_search_fts`;
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
DROP TABLE IF EXISTS `item_search`;
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
-- `id` is the item's rowid in `items` (creation order), so the index lists matches newest first and can stop early. The thread, kind and time of a hit are read from `items`.
|
|
13
|
+
CREATE TABLE `item_search` (
|
|
14
|
+
`id` integer PRIMARY KEY,
|
|
15
|
+
`session_id` text NOT NULL,
|
|
16
|
+
`item_id` text NOT NULL,
|
|
17
|
+
`text` text NOT NULL
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE UNIQUE INDEX `item_search_item` ON `item_search` (`session_id`,`item_id`);
|
|
21
|
+
--> statement-breakpoint
|
|
22
|
+
-- The full-text index over `item_search.text` (external content: the text is stored once, in `item_search`). Trigram tokens find substrings inside identifiers and paths, ignoring case and accents. `detail=none` keeps only rowids (about a quarter of the size with positions), so queries use single trigrams and search checks each candidate's text; `columnsize=0` drops the per-row sizes only ranking needed.
|
|
23
|
+
CREATE VIRTUAL TABLE `item_search_fts` USING fts5(`text`, content='item_search', content_rowid='id', tokenize='trigram remove_diacritics 1', detail='none', columnsize=0);
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
-- Triggers keep the index in step with every write to `item_search`, in the same transaction.
|
|
26
|
+
CREATE TRIGGER `item_search_ai` AFTER INSERT ON `item_search` BEGIN
|
|
27
|
+
INSERT INTO `item_search_fts` (rowid, `text`) VALUES (new.`id`, new.`text`);
|
|
28
|
+
END;
|
|
29
|
+
--> statement-breakpoint
|
|
30
|
+
CREATE TRIGGER `item_search_ad` AFTER DELETE ON `item_search` BEGIN
|
|
31
|
+
INSERT INTO `item_search_fts` (`item_search_fts`, rowid, `text`) VALUES ('delete', old.`id`, old.`text`);
|
|
32
|
+
END;
|
|
33
|
+
--> statement-breakpoint
|
|
34
|
+
CREATE TRIGGER `item_search_au` AFTER UPDATE OF `text` ON `item_search` WHEN old.`text` IS NOT new.`text` BEGIN
|
|
35
|
+
INSERT INTO `item_search_fts` (`item_search_fts`, rowid, `text`) VALUES ('delete', old.`id`, old.`text`);
|
|
36
|
+
INSERT INTO `item_search_fts` (rowid, `text`) VALUES (new.`id`, new.`text`);
|
|
37
|
+
END;
|
|
38
|
+
--> statement-breakpoint
|
|
39
|
+
-- How far the background backfill has read `items` (one row); no row means from the start.
|
|
40
|
+
CREATE TABLE `item_search_backfill` (
|
|
41
|
+
`id` integer PRIMARY KEY,
|
|
42
|
+
`after_rowid` integer NOT NULL
|
|
43
|
+
);
|