@edeng23/pines 0.1.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/LICENSE +202 -0
- package/README.md +37 -0
- package/dist/cli.js +83 -0
- package/dist/cli.js.map +1 -0
- package/dist/client/ansi.js +37 -0
- package/dist/client/ansi.js.map +1 -0
- package/dist/client/app.js +1868 -0
- package/dist/client/app.js.map +1 -0
- package/dist/client/boot.js +221 -0
- package/dist/client/boot.js.map +1 -0
- package/dist/client/commands.js +133 -0
- package/dist/client/commands.js.map +1 -0
- package/dist/client/daemon-client.js +99 -0
- package/dist/client/daemon-client.js.map +1 -0
- package/dist/client/forest/camera.js +88 -0
- package/dist/client/forest/camera.js.map +1 -0
- package/dist/client/forest/canvas.js +175 -0
- package/dist/client/forest/canvas.js.map +1 -0
- package/dist/client/forest/sidebar.js +182 -0
- package/dist/client/forest/sidebar.js.map +1 -0
- package/dist/client/forest/status.js +39 -0
- package/dist/client/forest/status.js.map +1 -0
- package/dist/client/forest/style.js +70 -0
- package/dist/client/forest/style.js.map +1 -0
- package/dist/client/forest/styles.js +429 -0
- package/dist/client/forest/styles.js.map +1 -0
- package/dist/client/forest/view.js +181 -0
- package/dist/client/forest/view.js.map +1 -0
- package/dist/client/forest/wordmark.js +26 -0
- package/dist/client/forest/wordmark.js.map +1 -0
- package/dist/client/input.js +89 -0
- package/dist/client/input.js.map +1 -0
- package/dist/client/theme.js +27 -0
- package/dist/client/theme.js.map +1 -0
- package/dist/client/tree/asciitree.js +277 -0
- package/dist/client/tree/asciitree.js.map +1 -0
- package/dist/client/tree/convmap.js +260 -0
- package/dist/client/tree/convmap.js.map +1 -0
- package/dist/client/tree/lanegraph.js +260 -0
- package/dist/client/tree/lanegraph.js.map +1 -0
- package/dist/client/tree/merge.js +161 -0
- package/dist/client/tree/merge.js.map +1 -0
- package/dist/client/tree/sessionview.js +163 -0
- package/dist/client/tree/sessionview.js.map +1 -0
- package/dist/client/tree/view.js +238 -0
- package/dist/client/tree/view.js.map +1 -0
- package/dist/client/uistate.js +45 -0
- package/dist/client/uistate.js.map +1 -0
- package/dist/daemon/agents.js +102 -0
- package/dist/daemon/agents.js.map +1 -0
- package/dist/daemon/branch.js +149 -0
- package/dist/daemon/branch.js.map +1 -0
- package/dist/daemon/embed-worker.js +74 -0
- package/dist/daemon/embed-worker.js.map +1 -0
- package/dist/daemon/essence.js +194 -0
- package/dist/daemon/essence.js.map +1 -0
- package/dist/daemon/extbridge.js +138 -0
- package/dist/daemon/extbridge.js.map +1 -0
- package/dist/daemon/lifecycle.js +134 -0
- package/dist/daemon/lifecycle.js.map +1 -0
- package/dist/daemon/pty-compat.js +53 -0
- package/dist/daemon/pty-compat.js.map +1 -0
- package/dist/daemon/semantic.js +337 -0
- package/dist/daemon/semantic.js.map +1 -0
- package/dist/daemon/server.js +808 -0
- package/dist/daemon/server.js.map +1 -0
- package/dist/daemon/supervisor.js +311 -0
- package/dist/daemon/supervisor.js.map +1 -0
- package/dist/extension/pines-extension.js +191 -0
- package/dist/extension/pines-extension.js.map +1 -0
- package/dist/layout/lexical.js +104 -0
- package/dist/layout/lexical.js.map +1 -0
- package/dist/layout/pca.js +91 -0
- package/dist/layout/pca.js.map +1 -0
- package/dist/layout/relax.js +47 -0
- package/dist/layout/relax.js.map +1 -0
- package/dist/session/ingest.js +95 -0
- package/dist/session/ingest.js.map +1 -0
- package/dist/session/parser.js +254 -0
- package/dist/session/parser.js.map +1 -0
- package/dist/shared/config.js +30 -0
- package/dist/shared/config.js.map +1 -0
- package/dist/shared/paths.js +47 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/protocol.js +9 -0
- package/dist/shared/protocol.js.map +1 -0
- package/dist/shared/types.js +3 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/wire.js +51 -0
- package/dist/shared/wire.js.map +1 -0
- package/dist/store/db.js +203 -0
- package/dist/store/db.js.map +1 -0
- package/dist/store/watcher.js +69 -0
- package/dist/store/watcher.js.map +1 -0
- package/package.json +80 -0
- package/scripts/fix-node-pty.mjs +34 -0
- package/src/extension/pines-extension.ts +192 -0
- package/src/store/schema.sql +60 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic layout coordinator: turns tree content into embeddings (worker
|
|
3
|
+
* thread), embeddings into 2-d positions (PCA + overlap relaxation), and
|
|
4
|
+
* keeps the forest stable — new trees project through the cached basis so
|
|
5
|
+
* existing trees never jump; a full refit happens only on explicit relayout
|
|
6
|
+
* or when the embedded population doubles.
|
|
7
|
+
*
|
|
8
|
+
* Embedding is chunk-based and incremental: each user message, summary, and
|
|
9
|
+
* digest embeds once (cached in tree_chunks, keyed by entry id/content hash),
|
|
10
|
+
* and the tree vector is a recency-weighted pool of the cached chunks — so a
|
|
11
|
+
* growing session costs O(new messages) per change, and the pooled vector
|
|
12
|
+
* tracks where the conversation *went*, not just how it started.
|
|
13
|
+
*/
|
|
14
|
+
import { Worker } from "node:worker_threads";
|
|
15
|
+
import { fitPca, projectPca } from "../layout/pca.js";
|
|
16
|
+
import { relax } from "../layout/relax.js";
|
|
17
|
+
import { parseSessionFile } from "../session/parser.js";
|
|
18
|
+
import { chunksForTree, deleteChunks, pruneUserChunks, upsertChunks, vectorOf, } from "../store/db.js";
|
|
19
|
+
import { DEFAULT_EMBED_MODEL, loadConfig } from "../shared/config.js";
|
|
20
|
+
import { essenceChunks, poolChunks, validChunkKeys, MAX_SUMMARY_CHUNKS, MAX_USER_CHUNKS, USER_CHUNK_CACHE, } from "./essence.js";
|
|
21
|
+
const DEBOUNCE_MS = 5000;
|
|
22
|
+
const MIN_TREES_FOR_PCA = 3;
|
|
23
|
+
/** Bump when chunking/pooling changes meaningfully: stale trees re-embed at startup. */
|
|
24
|
+
export const EMBED_VERSION = 2;
|
|
25
|
+
/** Stagger between startup backfill enqueues, so a big forest warms up gently. */
|
|
26
|
+
const BACKFILL_STAGGER_MS = 500;
|
|
27
|
+
export class SemanticLayout {
|
|
28
|
+
deps;
|
|
29
|
+
worker = null;
|
|
30
|
+
workerFailed = false;
|
|
31
|
+
modelReady = false;
|
|
32
|
+
timers = new Map();
|
|
33
|
+
pendingReqs = new Map();
|
|
34
|
+
reqCounter = 0;
|
|
35
|
+
/** Trees whose stale embeddings are being rebuilt at startup; refit when empty. */
|
|
36
|
+
backfill = null;
|
|
37
|
+
constructor(deps) {
|
|
38
|
+
this.deps = deps;
|
|
39
|
+
}
|
|
40
|
+
/** Schedule (re)embedding of a tree, debounced per tree. */
|
|
41
|
+
enqueue(rec) {
|
|
42
|
+
if (this.workerFailed || !rec.sessionPath)
|
|
43
|
+
return;
|
|
44
|
+
const prior = this.timers.get(rec.treeId);
|
|
45
|
+
if (prior)
|
|
46
|
+
clearTimeout(prior);
|
|
47
|
+
this.timers.set(rec.treeId, setTimeout(() => {
|
|
48
|
+
this.timers.delete(rec.treeId);
|
|
49
|
+
void this.embed(rec);
|
|
50
|
+
}, DEBOUNCE_MS));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Startup reconciliation: re-embed trees whose stored embedding predates the
|
|
54
|
+
* current chunking scheme, and wipe everything if the model changed (vectors
|
|
55
|
+
* from different models share no space). Called once by the daemon after
|
|
56
|
+
* persisted trees are loaded.
|
|
57
|
+
*/
|
|
58
|
+
enqueueStale() {
|
|
59
|
+
const model = loadConfig().embedModel ?? DEFAULT_EMBED_MODEL;
|
|
60
|
+
const stored = this.deps.db
|
|
61
|
+
.prepare("SELECT value FROM meta WHERE key = 'embed_model'")
|
|
62
|
+
.get();
|
|
63
|
+
if (stored && stored.value !== model) {
|
|
64
|
+
this.deps.log(`embed model changed (${stored.value} → ${model}) — full re-embed`);
|
|
65
|
+
this.deps.db.exec("DELETE FROM tree_chunks");
|
|
66
|
+
this.deps.db.exec("UPDATE trees SET embedding = NULL, embedding_version = 0");
|
|
67
|
+
this.deps.db.prepare("DELETE FROM meta WHERE key = 'pca_basis'").run();
|
|
68
|
+
}
|
|
69
|
+
this.deps.db
|
|
70
|
+
.prepare("INSERT INTO meta (key, value) VALUES ('embed_model', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value")
|
|
71
|
+
.run(model);
|
|
72
|
+
const stale = this.deps.db
|
|
73
|
+
.prepare("SELECT tree_id FROM trees WHERE embedding IS NOT NULL AND embedding_version < ?")
|
|
74
|
+
.all(EMBED_VERSION);
|
|
75
|
+
const recs = stale
|
|
76
|
+
.map((row) => this.deps.supervisor.trees.get(row.tree_id))
|
|
77
|
+
.filter((r) => r !== undefined);
|
|
78
|
+
if (recs.length === 0)
|
|
79
|
+
return;
|
|
80
|
+
this.backfill = new Set(recs.map((r) => r.treeId));
|
|
81
|
+
this.deps.log(`re-embedding ${recs.length} tree(s) with stale embeddings`);
|
|
82
|
+
recs.forEach((rec, i) => {
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
if (!this.timers.has(rec.treeId))
|
|
85
|
+
this.enqueue(rec);
|
|
86
|
+
}, i * BACKFILL_STAGGER_MS);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
async embed(rec) {
|
|
90
|
+
if (this.workerFailed || !rec.sessionPath)
|
|
91
|
+
return;
|
|
92
|
+
try {
|
|
93
|
+
const parsed = await parseSessionFile(rec.sessionPath);
|
|
94
|
+
const chunks = essenceChunks(rec.name ?? parsed.name, parsed);
|
|
95
|
+
if (chunks.length === 0) {
|
|
96
|
+
this.settleBackfill(rec.treeId);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
// Diff cached chunks against the full valid-key universe (not the capped
|
|
100
|
+
// pooling selection) so windows scrolling past a chunk doesn't churn it.
|
|
101
|
+
// Vanished keys cover renames and file shrink/fork flows.
|
|
102
|
+
const cached = new Set(chunksForTree(this.deps.db, rec.treeId).map((c) => c.chunk_key));
|
|
103
|
+
const valid = validChunkKeys(rec.name ?? parsed.name, parsed);
|
|
104
|
+
const stale = [...cached].filter((k) => !valid.has(k));
|
|
105
|
+
if (stale.length > 0)
|
|
106
|
+
deleteChunks(this.deps.db, rec.treeId, stale);
|
|
107
|
+
const pending = chunks.filter((c) => !cached.has(c.key));
|
|
108
|
+
if (pending.length === 0) {
|
|
109
|
+
// Nothing new to embed; repool only if something actually changed.
|
|
110
|
+
const row = this.deps.db
|
|
111
|
+
.prepare("SELECT embedding_version FROM trees WHERE tree_id = ?")
|
|
112
|
+
.get(rec.treeId);
|
|
113
|
+
if (stale.length > 0 || (row && row.embedding_version < EMBED_VERSION)) {
|
|
114
|
+
this.repool(rec.treeId);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.settleBackfill(rec.treeId);
|
|
118
|
+
}
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const worker = this.ensureWorker();
|
|
122
|
+
if (!worker) {
|
|
123
|
+
this.settleBackfill(rec.treeId);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const reqId = `r${++this.reqCounter}`;
|
|
127
|
+
this.pendingReqs.set(reqId, { treeId: rec.treeId, chunks: pending });
|
|
128
|
+
worker.postMessage({ reqId, texts: pending.map((c) => c.text) });
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
this.deps.log(`embed prep failed for ${rec.treeId}: ${String(err)}`);
|
|
132
|
+
this.settleBackfill(rec.treeId);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
ensureWorker() {
|
|
136
|
+
if (this.workerFailed)
|
|
137
|
+
return null;
|
|
138
|
+
if (this.worker)
|
|
139
|
+
return this.worker;
|
|
140
|
+
try {
|
|
141
|
+
this.worker = new Worker(new URL("./embed-worker.js", import.meta.url), {
|
|
142
|
+
env: {
|
|
143
|
+
...process.env,
|
|
144
|
+
PINES_EMBED_MODEL: loadConfig().embedModel ?? DEFAULT_EMBED_MODEL,
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
this.workerFailed = true;
|
|
150
|
+
this.deps.log(`embed worker failed to start: ${String(err)} — lexical layout only`);
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
this.worker.unref();
|
|
154
|
+
// Progress stays out of the user's face: warming and success are log
|
|
155
|
+
// lines; only the downgrade to lexical layout is worth a toast.
|
|
156
|
+
this.deps.log("semantic layout warming…");
|
|
157
|
+
this.worker.on("message", (msg) => {
|
|
158
|
+
if (msg.ready) {
|
|
159
|
+
this.modelReady = true;
|
|
160
|
+
this.deps.log("semantic layout ready");
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (msg.fatal) {
|
|
164
|
+
this.workerFailed = true;
|
|
165
|
+
this.pendingReqs.clear();
|
|
166
|
+
this.backfill = null;
|
|
167
|
+
this.deps.log(`embed worker fatal: ${String(msg.fatal)} — lexical layout only`);
|
|
168
|
+
this.deps.toast("semantic layout unavailable — arranging lexically");
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const reqId = typeof msg.reqId === "string" ? msg.reqId : null;
|
|
172
|
+
if (!reqId)
|
|
173
|
+
return;
|
|
174
|
+
const req = this.pendingReqs.get(reqId);
|
|
175
|
+
this.pendingReqs.delete(reqId);
|
|
176
|
+
if (!req)
|
|
177
|
+
return;
|
|
178
|
+
if (msg.error) {
|
|
179
|
+
// Keep the previous pooled vector — a stale essence beats none.
|
|
180
|
+
this.deps.log(`embed failed for ${req.treeId}: ${String(msg.error)}`);
|
|
181
|
+
this.settleBackfill(req.treeId);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (Array.isArray(msg.vectors)) {
|
|
185
|
+
this.onVectors(req, msg.vectors);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
this.worker.on("error", (err) => {
|
|
189
|
+
this.workerFailed = true;
|
|
190
|
+
this.pendingReqs.clear();
|
|
191
|
+
this.deps.log(`embed worker error: ${err.message} — lexical layout only`);
|
|
192
|
+
});
|
|
193
|
+
return this.worker;
|
|
194
|
+
}
|
|
195
|
+
onVectors(req, vectors) {
|
|
196
|
+
if (vectors.length !== req.chunks.length) {
|
|
197
|
+
this.deps.log(`embed reply shape mismatch for ${req.treeId}`);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
upsertChunks(this.deps.db, req.treeId, req.chunks.map((c, i) => ({
|
|
201
|
+
chunkKey: c.key,
|
|
202
|
+
kind: c.kind,
|
|
203
|
+
pos: c.pos,
|
|
204
|
+
embedding: Buffer.from(new Float32Array(vectors[i]).buffer),
|
|
205
|
+
})));
|
|
206
|
+
pruneUserChunks(this.deps.db, req.treeId, USER_CHUNK_CACHE);
|
|
207
|
+
this.repool(req.treeId);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Recompute the pooled tree vector from cached chunks and re-place the tree.
|
|
211
|
+
* Reading back from the DB (rather than the worker reply) makes overlapping
|
|
212
|
+
* embeds for one tree converge on the full-file state regardless of order.
|
|
213
|
+
*/
|
|
214
|
+
repool(treeId) {
|
|
215
|
+
const rows = chunksForTree(this.deps.db, treeId);
|
|
216
|
+
const users = rows.filter((r) => r.kind === "user");
|
|
217
|
+
const userWindow = new Set(users
|
|
218
|
+
.slice(-MAX_USER_CHUNKS)
|
|
219
|
+
.concat(users.length > 0 ? [users[0]] : [])
|
|
220
|
+
.map((r) => r.chunk_key));
|
|
221
|
+
const summaries = rows.filter((r) => r.kind === "summary");
|
|
222
|
+
const summaryWindow = new Set(summaries.slice(-MAX_SUMMARY_CHUNKS).map((r) => r.chunk_key));
|
|
223
|
+
const pooled = poolChunks(rows
|
|
224
|
+
.filter((r) => r.kind === "meta" ||
|
|
225
|
+
r.kind === "tools" ||
|
|
226
|
+
(r.kind === "user" && userWindow.has(r.chunk_key)) ||
|
|
227
|
+
(r.kind === "summary" && summaryWindow.has(r.chunk_key)))
|
|
228
|
+
.map((r) => ({ kind: r.kind, pos: r.pos, vec: vectorOf(r.embedding) })));
|
|
229
|
+
if (!pooled) {
|
|
230
|
+
this.settleBackfill(treeId);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const blob = Buffer.from(pooled.buffer);
|
|
234
|
+
this.deps.db
|
|
235
|
+
.prepare("UPDATE trees SET embedding = ?, embedding_version = ? WHERE tree_id = ?")
|
|
236
|
+
.run(blob, EMBED_VERSION, treeId);
|
|
237
|
+
this.placeTree(treeId);
|
|
238
|
+
this.settleBackfill(treeId);
|
|
239
|
+
}
|
|
240
|
+
/** Mark one backfilled tree settled; refit once when the whole set drains. */
|
|
241
|
+
settleBackfill(treeId) {
|
|
242
|
+
if (!this.backfill?.delete(treeId))
|
|
243
|
+
return;
|
|
244
|
+
if (this.backfill.size === 0) {
|
|
245
|
+
this.backfill = null;
|
|
246
|
+
this.deps.log("stale-embedding backfill drained — refitting basis");
|
|
247
|
+
this.refit();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
loadBasis() {
|
|
251
|
+
const row = this.deps.db.prepare("SELECT value FROM meta WHERE key = 'pca_basis'").get();
|
|
252
|
+
if (!row)
|
|
253
|
+
return null;
|
|
254
|
+
try {
|
|
255
|
+
return JSON.parse(row.value);
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
saveBasis(basis, fitCount) {
|
|
262
|
+
this.deps.db
|
|
263
|
+
.prepare("INSERT INTO meta (key, value) VALUES ('pca_basis', ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value")
|
|
264
|
+
.run(JSON.stringify({ basis, fitCount }));
|
|
265
|
+
}
|
|
266
|
+
embeddedRows() {
|
|
267
|
+
return this.deps.db
|
|
268
|
+
.prepare("SELECT tree_id, embedding FROM trees WHERE embedding IS NOT NULL")
|
|
269
|
+
.all();
|
|
270
|
+
}
|
|
271
|
+
/** Place one newly-embedded tree without disturbing the rest. */
|
|
272
|
+
placeTree(treeId) {
|
|
273
|
+
const rows = this.embeddedRows();
|
|
274
|
+
if (rows.length < MIN_TREES_FOR_PCA)
|
|
275
|
+
return; // not enough signal yet
|
|
276
|
+
let stored = this.loadBasis();
|
|
277
|
+
if (!stored || rows.length >= stored.fitCount * 2) {
|
|
278
|
+
this.refit(rows);
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const row = rows.find((r) => r.tree_id === treeId);
|
|
282
|
+
const rec = this.deps.supervisor.trees.get(treeId);
|
|
283
|
+
if (!row || !rec)
|
|
284
|
+
return;
|
|
285
|
+
const pos = projectPca(stored.basis, vectorOf(row.embedding));
|
|
286
|
+
const points = [...this.deps.supervisor.trees.values()].map((t) => ({
|
|
287
|
+
x: t === rec ? pos.x : t.x,
|
|
288
|
+
y: t === rec ? pos.y : t.y,
|
|
289
|
+
pinned: t !== rec,
|
|
290
|
+
rec: t,
|
|
291
|
+
}));
|
|
292
|
+
relax(points);
|
|
293
|
+
const placed = points.find((p) => p.rec === rec);
|
|
294
|
+
rec.x = placed.x;
|
|
295
|
+
rec.y = placed.y;
|
|
296
|
+
this.deps.supervisor.notify(rec);
|
|
297
|
+
}
|
|
298
|
+
/** Refit the basis and reproject every embedded tree (non-embedded pinned). */
|
|
299
|
+
refit(rows = this.embeddedRows()) {
|
|
300
|
+
if (rows.length < MIN_TREES_FOR_PCA)
|
|
301
|
+
return;
|
|
302
|
+
const vectors = rows.map((r) => vectorOf(r.embedding));
|
|
303
|
+
const basis = fitPca(vectors);
|
|
304
|
+
this.saveBasis(basis, rows.length);
|
|
305
|
+
const byId = new Map(rows.map((r, i) => [r.tree_id, vectors[i]]));
|
|
306
|
+
const points = [];
|
|
307
|
+
for (const rec of this.deps.supervisor.trees.values()) {
|
|
308
|
+
const vec = byId.get(rec.treeId);
|
|
309
|
+
if (vec) {
|
|
310
|
+
const pos = projectPca(basis, vec);
|
|
311
|
+
points.push({ x: pos.x, y: pos.y, pinned: false, rec });
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
points.push({ x: rec.x, y: rec.y, pinned: true, rec });
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
relax(points);
|
|
318
|
+
for (const p of points) {
|
|
319
|
+
if (p.pinned)
|
|
320
|
+
continue;
|
|
321
|
+
if (p.rec.x !== p.x || p.rec.y !== p.y) {
|
|
322
|
+
p.rec.x = p.x;
|
|
323
|
+
p.rec.y = p.y;
|
|
324
|
+
this.deps.supervisor.notify(p.rec);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
this.deps.log(`semantic refit over ${rows.length} embedded tree(s)`);
|
|
328
|
+
}
|
|
329
|
+
async dispose() {
|
|
330
|
+
for (const t of this.timers.values())
|
|
331
|
+
clearTimeout(t);
|
|
332
|
+
this.timers.clear();
|
|
333
|
+
this.pendingReqs.clear();
|
|
334
|
+
await this.worker?.terminate();
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
//# sourceMappingURL=semantic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.js","sourceRoot":"","sources":["../../src/daemon/semantic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,QAAQ,GAET,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EACL,aAAa,EACb,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GAEjB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,wFAAwF;AACxF,MAAM,CAAC,MAAM,aAAa,GAAG,CAA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