@yagni-app/code-staging 1.1.4-staging.1414.1 → 1.1.4-staging.1415.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.
|
@@ -141,14 +141,21 @@ export function formatDiffStat(diff) {
|
|
|
141
141
|
export function createDiffStatCache(workDir, run = runGit) {
|
|
142
142
|
const isRepo = detectGitRepo(run, workDir);
|
|
143
143
|
let cached = null;
|
|
144
|
+
// Distinct from `cached === null`: null is a legitimate, cacheable answer
|
|
145
|
+
// (no resolvable default branch, unrelated histories, a git failure). Keying
|
|
146
|
+
// freshness off the VALUE made every render re-run readDiffStat — 3-7 `git`
|
|
147
|
+
// spawns per keystroke, which is ~5ms each on macOS but 30-80ms on Windows,
|
|
148
|
+
// where it dominates typing latency. Key off whether we have fetched instead.
|
|
149
|
+
let fetched = false;
|
|
144
150
|
let fetchedAt = 0;
|
|
145
151
|
return {
|
|
146
152
|
get() {
|
|
147
153
|
if (!isRepo)
|
|
148
154
|
return null;
|
|
149
155
|
const now = Date.now();
|
|
150
|
-
if (
|
|
156
|
+
if (!fetched || now - fetchedAt >= STATUS_TTL_MS) {
|
|
151
157
|
cached = readDiffStat(run, workDir);
|
|
158
|
+
fetched = true;
|
|
152
159
|
fetchedAt = now;
|
|
153
160
|
}
|
|
154
161
|
return cached;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "1.1.4-staging.
|
|
3
|
+
"version": "1.1.4-staging.1415.1",
|
|
4
4
|
"description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"turndown": "^7.2.4",
|
|
59
59
|
"typebox": "^1.3.15"
|
|
60
60
|
},
|
|
61
|
-
"yagniSourceSha": "
|
|
61
|
+
"yagniSourceSha": "f4fe956b10a09436d8429ae3f6b82cfa73a8d880"
|
|
62
62
|
}
|