@kitkat-vn/kitcode 0.2.0-staging.3 → 0.2.0-staging.5
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/README.md +14 -21
- package/bin/kitcode.mjs +182 -13
- package/package.json +2 -2
- package/src/api.mjs +31 -21
- package/src/companion-window.mjs +10 -8
- package/src/diagnostics.mjs +872 -0
- package/src/git.mjs +48 -8
- package/src/hook-prompt.mjs +19 -3
- package/src/integration-spec.mjs +46 -37
- package/src/onboarding-electron.mjs +8 -0
- package/src/onboarding-window.mjs +47 -7
- package/src/reward.mjs +4 -41
- package/src/runtime.mjs +30 -13
- package/src/source-snapshot.mjs +11 -3
- package/src/tracker-problems.mjs +1 -0
package/src/source-snapshot.mjs
CHANGED
|
@@ -505,7 +505,9 @@ export function readProjectSourcesUnder(root, {sourceType = 'vibe', rules}) {
|
|
|
505
505
|
// A read in which git did anything but the user's own commits carries `gitOperation`: what it found
|
|
506
506
|
// changed is git's, and not activity (operator decision Q4, 2026-09-25). A baseline always does; so does
|
|
507
507
|
// a read after git acted without moving HEAD, as a stash does, which is read whole too, like a move, so
|
|
508
|
-
// that none of what git changed is left for a later scan to take for the user's.
|
|
508
|
+
// that none of what git changed is left for a later scan to take for the user's. A read that is a
|
|
509
|
+
// baseline because an operation waits for the user carries `gitWaiting` too, the files git left for it,
|
|
510
|
+
// for the tracker's log (since 2026-10-01).
|
|
509
511
|
function checkedAgainstGit(root, sourceType, since, read, readAll) {
|
|
510
512
|
const first = read();
|
|
511
513
|
|
|
@@ -513,9 +515,15 @@ function checkedAgainstGit(root, sourceType, since, read, readAll) {
|
|
|
513
515
|
return first;
|
|
514
516
|
}
|
|
515
517
|
|
|
516
|
-
const {arrival, operation, position} = gitArrival(root, since);
|
|
518
|
+
const {arrival, operation, position, waiting} = gitArrival(root, since);
|
|
517
519
|
const reads = arrival === 'moved' || arrival === 'unexplained' || (arrival === null && operation) ? readAll() : first;
|
|
518
|
-
const mark = (entry) => ({
|
|
520
|
+
const mark = (entry) => ({
|
|
521
|
+
...entry,
|
|
522
|
+
git: position,
|
|
523
|
+
...(arrival ? {baseline: arrival} : {}),
|
|
524
|
+
...(waiting ? {gitWaiting: waiting} : {}),
|
|
525
|
+
...(operation ? {gitOperation: true} : {}),
|
|
526
|
+
});
|
|
519
527
|
|
|
520
528
|
return Array.isArray(reads) ? reads.map(mark) : mark(reads);
|
|
521
529
|
}
|
package/src/tracker-problems.mjs
CHANGED
|
@@ -10,6 +10,7 @@ const PROBLEM_SENTENCES = {
|
|
|
10
10
|
'project-missing': 'A KitCode project folder is missing, so nothing in it is counted.',
|
|
11
11
|
'scan-failed': 'KitCode tracker could not read a project, so its = are not being counted.',
|
|
12
12
|
'git-locked': 'A KitCode project\'s git index has stayed locked (index.lock in its .git folder), so nothing in it is counted until the lock goes; a git command that crashed can leave that file behind.',
|
|
13
|
+
'git-unfinished': 'A KitCode project has an unfinished git operation (a merge, rebase, cherry-pick, revert, am or squash merge), so nothing in it is counted until that operation is finished or aborted.',
|
|
13
14
|
};
|
|
14
15
|
const UNKNOWN_PROBLEM = 'KitCode tracker is working with a problem; its log is ~/.kitcode/tracker.log.';
|
|
15
16
|
|