@polycode-projects/the-mechanical-code-talker 5.0.29 → 5.0.30
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/corpus/conceptnet/README.md +85 -41
- package/corpus/conceptnet/commonsenseqa-seed.mjs +322 -0
- package/corpus/conceptnet/filter-dump.mjs +6 -1
- package/corpus/conceptnet/manifest.json +51 -0
- package/corpus/conceptnet/quality-filter.mjs +11 -0
- package/corpus/conceptnet/slice.jsonl +28365 -42942
- package/package.json +1 -1
- package/src/domain/news-feed.mjs +30 -6
- package/src/services/chat-page-viz.mjs +6 -3
- package/src/services/extensions.mjs +9 -2
- package/src/services/news-viz.mjs +2 -0
- package/src/services/news.mjs +3 -2
- package/src/surfaces/web/memory-ask-browser.bundle.js +52 -52
- package/src/surfaces/web/news-browser-entry.mjs +20 -1
|
@@ -136,7 +136,26 @@ export function createNewsSession({
|
|
|
136
136
|
const memoryDir = createInMemoryStore();
|
|
137
137
|
applySeedPayload(memoryDir, seedPayload);
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
// Folding the seeded store is seconds of main-thread work in a browser,
|
|
140
|
+
// and every session verb reads rows — uncached, a 30-item feed render
|
|
141
|
+
// folds the whole store once per item and freezes the page for minutes.
|
|
142
|
+
// One fold per write epoch keeps every read on the same rows.
|
|
143
|
+
let foldedRows = null;
|
|
144
|
+
const store = {
|
|
145
|
+
loadMemory,
|
|
146
|
+
readFactRows(memory) {
|
|
147
|
+
if (!foldedRows) foldedRows = readFactRows(memory);
|
|
148
|
+
return foldedRows;
|
|
149
|
+
},
|
|
150
|
+
async appendFacts(...args) {
|
|
151
|
+
foldedRows = null;
|
|
152
|
+
return appendFacts(...args);
|
|
153
|
+
},
|
|
154
|
+
async removeFacts(...args) {
|
|
155
|
+
foldedRows = null;
|
|
156
|
+
return removeFacts(...args);
|
|
157
|
+
},
|
|
158
|
+
};
|
|
140
159
|
const cache = { rows: null };
|
|
141
160
|
let lexicon = loadLexicon();
|
|
142
161
|
let config = resolveNewsConfig();
|