modelstat 0.8.0 → 0.8.1

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/cli.mjs CHANGED
@@ -85,10 +85,15 @@ function parseRemote(url) {
85
85
  return { host: null, slug: null };
86
86
  }
87
87
  }
88
+ function mainRepoPath(cwd) {
89
+ const i = cwd.indexOf("/.claude/");
90
+ return i === -1 ? cwd : cwd.slice(0, i);
91
+ }
88
92
  async function resolveGitContext(cwd) {
89
93
  if (!cwd) return null;
90
- if (cache.has(cwd)) return cache.get(cwd) ?? null;
91
- const root = findRepoRoot(cwd);
94
+ const target = mainRepoPath(cwd);
95
+ if (cache.has(target)) return cache.get(target) ?? null;
96
+ const root = findRepoRoot(target);
92
97
  if (!root) {
93
98
  const empty = {
94
99
  remote_url: null,
@@ -97,7 +102,7 @@ async function resolveGitContext(cwd) {
97
102
  branch: null,
98
103
  commit_sha: null
99
104
  };
100
- cache.set(cwd, empty);
105
+ cache.set(target, empty);
101
106
  return empty;
102
107
  }
103
108
  const ran = async (args) => {
@@ -119,7 +124,7 @@ async function resolveGitContext(cwd) {
119
124
  branch,
120
125
  commit_sha: sha
121
126
  };
122
- cache.set(cwd, ctx);
127
+ cache.set(target, ctx);
123
128
  return ctx;
124
129
  }
125
130
  function guessRepoSlugFromPath(cwd) {
@@ -37176,7 +37181,7 @@ var init_scan = __esm({
37176
37181
  init_api();
37177
37182
  init_config2();
37178
37183
  init_pipeline2();
37179
- DAEMON_VERSION = true ? "daemon-0.8.0" : "daemon-dev";
37184
+ DAEMON_VERSION = true ? "daemon-0.8.1" : "daemon-dev";
37180
37185
  BATCH_MAX_EVENTS = INGEST_BATCH_MAX_EVENTS;
37181
37186
  BATCH_MAX_TOOL_CALLS = 2e4;
37182
37187
  BATCH_BUFFER_HARD_CAP = BATCH_MAX_EVENTS * 2;
@@ -40103,7 +40108,7 @@ var init_daemon = __esm({
40103
40108
  init_scan();
40104
40109
  init_single_flight();
40105
40110
  init_update();
40106
- DAEMON_VERSION2 = true ? "daemon-0.8.0" : "daemon-dev";
40111
+ DAEMON_VERSION2 = true ? "daemon-0.8.1" : "daemon-dev";
40107
40112
  HEARTBEAT_INTERVAL_MS = 1e4;
40108
40113
  SCAN_INTERVAL_MS = 5 * 60 * 1e3;
40109
40114
  DISCOVERY_INTERVAL_MS = 6e4;
@@ -40707,7 +40712,7 @@ function tryOpenBrowser(url) {
40707
40712
  return false;
40708
40713
  }
40709
40714
  }
40710
- var DAEMON_VERSION3 = true ? "daemon-0.8.0" : "daemon-dev";
40715
+ var DAEMON_VERSION3 = true ? "daemon-0.8.1" : "daemon-dev";
40711
40716
  function osFamily() {
40712
40717
  const p = platform6();
40713
40718
  if (p === "darwin") return "macos";