mindkeeper-openclaw 0.2.19 → 0.2.20
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 +13 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -570,7 +570,7 @@ function getGlobalConfigPath() {
|
|
|
570
570
|
function getWorkspaceConfigPath(workDir) {
|
|
571
571
|
return import_node_path2.default.join(workDir, ".mindkeeper.json");
|
|
572
572
|
}
|
|
573
|
-
async function loadConfig(workDir) {
|
|
573
|
+
async function loadConfig(workDir, overrides) {
|
|
574
574
|
let merged = structuredClone(
|
|
575
575
|
DEFAULT_CONFIG
|
|
576
576
|
);
|
|
@@ -585,6 +585,9 @@ async function loadConfig(workDir) {
|
|
|
585
585
|
validateNoSensitiveFields(workspaceConfig, workspacePath);
|
|
586
586
|
merged = deepMerge(merged, workspaceConfig);
|
|
587
587
|
}
|
|
588
|
+
if (overrides && Object.keys(overrides).length > 0) {
|
|
589
|
+
merged = deepMerge(merged, overrides);
|
|
590
|
+
}
|
|
588
591
|
return merged;
|
|
589
592
|
}
|
|
590
593
|
function getDefaultConfig() {
|
|
@@ -684,10 +687,12 @@ var Tracker = class {
|
|
|
684
687
|
llmProvider;
|
|
685
688
|
workDir;
|
|
686
689
|
gitDir;
|
|
690
|
+
configOverrides;
|
|
687
691
|
constructor(options) {
|
|
688
692
|
this.workDir = import_node_path3.default.resolve(options.workDir);
|
|
689
693
|
this.gitDir = options.gitDir ? import_node_path3.default.resolve(options.gitDir) : import_node_path3.default.join(this.workDir, GITDIR_NAME);
|
|
690
694
|
this.config = options.config ?? getDefaultConfig();
|
|
695
|
+
this.configOverrides = options.configOverrides;
|
|
691
696
|
this.llmProvider = options.llmProvider;
|
|
692
697
|
this.store = new IsomorphicGitStore({
|
|
693
698
|
workDir: this.workDir,
|
|
@@ -695,7 +700,7 @@ var Tracker = class {
|
|
|
695
700
|
});
|
|
696
701
|
}
|
|
697
702
|
async init() {
|
|
698
|
-
this.config = await loadConfig(this.workDir);
|
|
703
|
+
this.config = await loadConfig(this.workDir, this.configOverrides);
|
|
699
704
|
await this.store.init();
|
|
700
705
|
await this.ensureGitignore();
|
|
701
706
|
const changed = await this.getTrackedChangedFiles();
|
|
@@ -1162,7 +1167,12 @@ function createWatcherService(api, trackerRef) {
|
|
|
1162
1167
|
config: ctx.config,
|
|
1163
1168
|
log
|
|
1164
1169
|
});
|
|
1165
|
-
const
|
|
1170
|
+
const configOverrides = api.pluginConfig;
|
|
1171
|
+
const tracker = new Tracker({
|
|
1172
|
+
workDir: workspaceDir,
|
|
1173
|
+
llmProvider: llmProvider ?? void 0,
|
|
1174
|
+
configOverrides: configOverrides ?? void 0
|
|
1175
|
+
});
|
|
1166
1176
|
await tracker.init();
|
|
1167
1177
|
trackerRef.current = tracker;
|
|
1168
1178
|
watcher = new Watcher({
|
package/openclaw.plugin.json
CHANGED