Extract schema DDL into scripts/schema.sql shared between CLI and app. Add an in-process chokidar-based indexer-service that watches ~/.claude/projects for JSONL changes, debounces, and triggers background rebuilds via a worker thread. Rename Usage view to Activity, flesh out MemoryDetail and SubagentDetail views, and refine App.vue layout/routing. The main process now starts/stops the indexer lifecycle and notifies renderer windows on index updates.
18 lines
395 B
JavaScript
18 lines
395 B
JavaScript
const { parentPort } = require('worker_threads');
|
|
const { buildIndex } = require('./indexer');
|
|
|
|
parentPort.on('message', ({ id, args }) => {
|
|
try {
|
|
const result = buildIndex(args || {});
|
|
parentPort.postMessage({ id, result });
|
|
} catch (error) {
|
|
parentPort.postMessage({
|
|
id,
|
|
error: {
|
|
message: error.message,
|
|
stack: error.stack,
|
|
},
|
|
});
|
|
}
|
|
});
|