zapmyco 0.10.0 → 0.11.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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { D as configureLogger, H as SESSION_DIR_NAME, I as ZapmycoErrorCode, L as buildSkillSnapshot, O as logger, P as WebError, R as loadSkills, T as DEFAULT_COMPACTION_CONFIG, U as VERSION, V as APP_NAME, W as __require, h as createLlmBasedAgent, i as AgentLlmFacade, n as loadConfig, p as SubAgentManager, t as HOME_CONFIG_PATH, w as eventBus } from "../loader-36UrSNj8.mjs";
2
+ import { D as configureLogger, H as SESSION_DIR_NAME, I as ZapmycoErrorCode, L as buildSkillSnapshot, O as logger, P as WebError, R as loadSkills, T as DEFAULT_COMPACTION_CONFIG, U as VERSION, V as APP_NAME, W as __require, h as createLlmBasedAgent, i as AgentLlmFacade, n as loadConfig, p as SubAgentManager, t as HOME_CONFIG_PATH, w as eventBus } from "../loader-CosX5iDC.mjs";
3
3
  import { createHash, randomBytes } from "node:crypto";
4
4
  import { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
@@ -10873,7 +10873,7 @@ var WorktreeStore = class {
10873
10873
  cache = /* @__PURE__ */ new Map();
10874
10874
  loaded = false;
10875
10875
  constructor(baseDir) {
10876
- this.baseDir = baseDir ?? getDefaultBaseDir();
10876
+ this.baseDir = baseDir || getDefaultBaseDir();
10877
10877
  }
10878
10878
  /** 获取存储目录 */
10879
10879
  getBaseDir() {
@@ -11004,7 +11004,7 @@ var WorktreeManager = class {
11004
11004
  const timestamp = Date.now();
11005
11005
  const branchName = `zapmyco-${options.slug}-${timestamp}`;
11006
11006
  const dirName = `${options.slug}-${timestamp}`;
11007
- const worktreePath = join(this.config.baseDir, dirName);
11007
+ const worktreePath = join(this.store.getBaseDir(), dirName);
11008
11008
  let gitRoot;
11009
11009
  try {
11010
11010
  const { stdout } = await execFileAsync("git", ["rev-parse", "--show-toplevel"], { timeout: 5e3 });
@@ -15423,6 +15423,7 @@ var ReplSession = class {
15423
15423
  baseDir: join(homedir(), ".zapmyco", "worktrees"),
15424
15424
  ...rawConfig
15425
15425
  };
15426
+ if (!worktreeConfig.baseDir) worktreeConfig.baseDir = join(homedir(), ".zapmyco", "worktrees");
15426
15427
  this.worktreeManager = new WorktreeManager(worktreeConfig);
15427
15428
  setWorktreeManager(this.worktreeManager);
15428
15429
  this.worktreeManager.cleanExpired().catch((err) => {