mindkeeper-openclaw 0.3.0 → 0.3.2
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/dist/index.js +7 -5
- package/dist/llm-client.cjs +45 -36734
- package/package.json +10 -13
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -1061,20 +1061,18 @@ var Watcher = class {
|
|
|
1061
1061
|
lockfilePath;
|
|
1062
1062
|
onSnapshot;
|
|
1063
1063
|
onError;
|
|
1064
|
+
onReady;
|
|
1064
1065
|
constructor(options) {
|
|
1065
1066
|
this.tracker = options.tracker;
|
|
1066
1067
|
this.debounceMs = options.debounceMs ?? options.tracker.getConfig().snapshot.debounceMs;
|
|
1067
1068
|
this.lockfilePath = import_node_path4.default.join(options.tracker.gitDir, LOCKFILE_NAME);
|
|
1068
1069
|
this.onSnapshot = options.onSnapshot;
|
|
1069
1070
|
this.onError = options.onError;
|
|
1071
|
+
this.onReady = options.onReady;
|
|
1070
1072
|
}
|
|
1071
1073
|
async start() {
|
|
1072
1074
|
await this.acquireLock();
|
|
1073
|
-
|
|
1074
|
-
const watchPaths = config.tracking.include.map(
|
|
1075
|
-
(pattern) => import_node_path4.default.join(this.tracker.workDir, pattern)
|
|
1076
|
-
);
|
|
1077
|
-
this.watcher = (0, import_chokidar.watch)(watchPaths, {
|
|
1075
|
+
this.watcher = (0, import_chokidar.watch)(this.tracker.workDir, {
|
|
1078
1076
|
ignoreInitial: true,
|
|
1079
1077
|
persistent: true,
|
|
1080
1078
|
ignored: [
|
|
@@ -1086,6 +1084,10 @@ var Watcher = class {
|
|
|
1086
1084
|
this.watcher.on("add", (filePath) => this.handleChange(filePath));
|
|
1087
1085
|
this.watcher.on("unlink", (filePath) => this.handleChange(filePath));
|
|
1088
1086
|
this.watcher.on("error", (err) => this.onError?.(err instanceof Error ? err : new Error(String(err))));
|
|
1087
|
+
this.watcher.on("ready", () => this.onReady?.());
|
|
1088
|
+
await new Promise((resolve) => {
|
|
1089
|
+
this.watcher.once("ready", resolve);
|
|
1090
|
+
});
|
|
1089
1091
|
}
|
|
1090
1092
|
async stop() {
|
|
1091
1093
|
if (this.debounceTimer) {
|